-
1. Re: problems with seam 2.0.0GA and custom validation message
kosl Dec 17, 2007 8:17 PM (in response to kosl)When I use the same code with @Lenght validation all is working fine. Am I right that it's caused by the problem described in documentation:
Note: specifying @NotNull on the model does not eliminate the requirement for required="true" to appear on the control! This is due to a limitation of the JSF validation architecture.
?
If so is there any way to customize validation error message for required=true constraing?
Regards,
karol -
2. Re: problems with seam 2.0.0GA and custom validation message
jacob.orshalick Dec 17, 2007 11:17 PM (in response to kosl)This is a very common JSF problem. required=true must be specified because JSF will not kick off any validation for empty fields. This means that you are limited to the REQUIRED message unless you do your own custom handling. The approach I've used in the past can be found at:
http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state/content/navId.4/navSetId._/vtTopicFile.jsf_apps%7Ceventvalidate%7Csf_amg_messagesoverride~html/
Under "Add Field Reference Information to a Message." I've also seen slightly different takes on this approach in a number of blogs. Hope that helps. -
3. Re: problems with seam 2.0.0GA and custom validation message
kosl Dec 19, 2007 7:28 PM (in response to kosl)Thank you very much for the reply!
Regards,
karol