This content has been marked as final.
Show 5 replies
-
1. Re: Required field custom message
cosmo Oct 5, 2009 10:31 PM (in response to bashan)You can also use your JSF component's attribute 'requiredMessage'.
-
2. Re: Required field custom message
bashan Oct 6, 2009 12:03 AM (in response to bashan)Thanks,
I was still wondering if there is a way to show the customrequired
message directly from the @NotNull property... -
3. Re: Required field custom message
cosmo Oct 6, 2009 2:48 PM (in response to bashan)AFAIK, entity level restrictions only apply when the entity is being persisted/updated.
-
4. Re: Required field custom message
bashan Oct 6, 2009 4:55 PM (in response to bashan)Hi Aldo,
Are you sure about that?
When I use @Length validation or @Email validation I get the error messages on the UI before persisting the object.Guy.
-
5. Re: Required field custom message
cosmo Oct 6, 2009 8:44 PM (in response to bashan)Your observation is correct. I think I made a misasumption based on what I thought @NotNull did. Anyways, thanks for pointing this out.
Regarding your first question, @Length may be more suitable to your needs in this case, due to the fact that JSF is passing a zero lenght string instead of a null.