1 Reply Latest reply on Jun 3, 2011 7:07 PM by Tun Naing

    rich client validation disabled?

    Tun Naing Newbie



      There is a disabled attribute for validator in rich.taglib.xml. When I set disabled="true" in richfaces-showcase demo, the client side validation is still enabled. I'd like to enable the validation conditionally.

      Any suggestions or work around of the issue?



      <h:outputText value="I agree the terms" />
      <h:selectBooleanCheckbox value="#{validationBean.agreed}" id="agreed">
      <rich:validator disabled="true" immediate="true"/>




      Thanks in advance,


        • 1. Re: rich client validation disabled?
          Tun Naing Newbie

          I was able to workaround the issue by using the rich:graphValidator with groups.


          Set the groups to Validate only when you want the form submit to validate the fields.


          <rich:graphValidator value="#{passwordValidationBean}" id="gv" groups="org.richfaces.demo.validation.Validate">


          @Size(min = 1, max = 15, message = "Wrong size for password", groups=Validate.class)
          private String password="";



          package org.richfaces.demo.validation;


          public interface Validate {