1 Reply Latest reply on Mar 27, 2009 3:42 PM by Nick Belaevski

    Can't validate null date with beanValidator

    Tim Lawson Newbie

      Hi all,

      I have a <rich:calendar> I'm trying to validate using a <rich:beanValidator> and the @NotNull annotation, but it never seems to trigger. My calendar component looks like this:

      <rich:calendar id="releaseDate" value="#{articleEdit.releaseDate}" datePattern="MMMM d, yyyy" >
       <a4j:support event="onchanged"/>
       <rich:beanValidator summary="A date is required."/>
      </rich:calendar>
      


      and the field in my bean looks like this:
      @NotNull
      private Date releaseDate = new Date();
      


      I'm using RichFaces 3.3.0. Is there any way to validate a not null date on a calendar or will I just have to force a default date into there?

      Thanks!