AnsweredAssumed Answered

how to do custom validaton in fdk forms without <constraint type='MANDATORY'>

Question asked by rajupingili on Feb 25, 2013
Latest reply on Mar 14, 2013 by shazada
Hi all,

Am using Alfresco fdk forms, in this i want to do validation like, my chequeNumber should not allow special character  and it is not mandatory filed.In my workflow form i wrote like

<field id="remwf:billNumber" label="Bill Number" set="response" mandatory="true">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl">
                     <control-param name="maxLength">15</control-param>
                     <control-param name="style">width:40%</control-param>
         <constraint type="MANDATORY" validation-handler="Alfresco.forms.validation.specialChar" event="keyup" />

it is working.but if i remove mandatory="true" or <constraint type="MANDATORY"> , it is not working but my filed for which i want do validation is not mandatory. how can i do this. can any one help me.