2 Replies Latest reply on Dec 2, 2007 9:33 AM by Pete Muir

    Custom Validator? How?

    Daniel Paranhos Newbie

      I could not make my custom validator work. It has an attribute and the attribute is always being null when the validate method is being called. Am I missing something?


      My faces-config.xml

      <validator>
       <validator-id>LevelValidator</validator-id>
       <validator-class>br.gov.exercito.silog.validator.LevelValidator</validator-class>
       <property>
       <property-name>minimum</property-name>
       <property-class>java.math.BigDecimal</property-class>
       </property>
      </validator>


      My facelet-taglib is:
      <tag>
       <tag-name>levelValidator</tag-name>
       <validator>
       <validator-id>LevelValidator</validator-id>
       </validator>
      </tag>


      My xhtml code is:
      <h:inputText id="nbMaxLevel"
       value="#{levelHome.instance.nbMaxLevel}"
       size="20" maxlength="13">
       <fpf:levelValidator limit="5"/>
      </h:inputText>