Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

@NotBlank doesn't work with JSF Bean validation

J_fresh_devSep 25 2011 — edited Sep 26 2011
i am using javax & hibernate validation annotation in my managed bean, and when i use @NotNull or @NotBlank or @NotEmpty
they doesn't seem to be working, any ideas why, and how to solve it ?

btw, my ValidationMessages.properties file is in src/main/resources folder.

@NotBlank(message = "{name.required}")
public String name;


JSF:

<h:outputLabel>Name:</h:outputLabel>
<h:inputText id="name" value="#{person.name}" size="20">
</h:inputText>
<h:message for="name" style="color:red" />
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 24 2011
Added on Sep 25 2011
1 comment
732 views