[jboss-user] [JBoss Seam] - s:validate ignores annotations if custom validator specified

ASavitsky do-not-reply at jboss.com
Tue Aug 14 16:35:11 EDT 2007


I have an entity that contains email property:
@Email private String email;

This property is also subject to a unique constraint, which is coded in the backing bean:

public void validateEmail(FacesContext context, UIComponent component, Object value) {
  |    // some custom code that validates email uniqieness in DB...
  | }

Now, when these two are combined in the view, the @Email constraint gets ignored:

<s:validate><h:inputText value="#{selectedUser.email}"
  | validator="#{userController.validateEmail}" /></s:validate>

Is this an expected behavior, or a bug?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074178#4074178

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074178



More information about the jboss-user mailing list