3 Replies Latest reply on Aug 14, 2007 5:06 PM by Pete Muir

    s:validate ignores annotations if custom validator specified

    Alex Savitsky Novice

      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?