0 Replies Latest reply on Nov 20, 2011 11:58 PM by Niraj Adhikary

    Is there any configuration chnages to be made, to add inbuilt validation in JSF?

    Niraj Adhikary Newbie

      Hi Guys,

           I know its a stupid question, but as I am new to this framework, and new to UI development, I wanna know is there any configuration changes we have to make to work with inbuilt validations provided by JSF? What I have done, I will give a glimpse of my code, as it is proprietery I can not go with the original code, please be cooperative with me.

       

       

      <h:inputText value ="#{SomeBean.someProperty}"

      id ="someIds" size="12" styleClass="formTxtBox"

       

      maxlength ="3" onkeydown="enableSave();" required="true">

       

      <f:validateLongRange maximum="100" minimum="0" />

       

      </h:inputText>

       

      The "maxlength" property is working properly, but "validateLongRange" is not. I am able to save with value 999 while the field should take value within range 0 and 100. Again this UI component is independent, in the sense, its not importing any other UI component. 

       

      Any help is appriciated.