AnsweredAssumed Answered

Validation of range with numberrange.ftl

Question asked by mcasanket on Dec 29, 2011
Latest reply on Mar 25, 2014 by darkredd
Hello Everyone,
In one requirement I am using numberrange.ftl file, to search files by size. I have configured my code in share-config.xml and It is showing me the two text boxes for minimum and maximum size.
   I want to put some client validation like min size should be less than max size, Accepts only numbers no special characters and text.
My code in share-config.xml is as below.
<config evaluator="string-compare" condition="Adv">
            <form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
            <form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form>
       [b]<form labelId="Search By Size" descriptionId="Search by size">cm:content</form>[/b] <!– Mine –>

<config evaluator="model-type" condition="cm:content">
   <form id="search">
       <!– <show id="kb:ilLevelOne" /> –>
       <show id="mimetype" />
       <show id="cm:categories" force="true"/> 
       <show id="size" />
       <field id="mimetype" label="Document Type">
           <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
       <field id="cm:categories" label="Document Category">
               <control-param name="compactMode">true</control-param>
   <!– Number Range for file range.–>
       <field id="size" label="Document Size">
          <control template="/org/alfresco/components/form/controls/numberrange.ftl" />    

Please help!
Thanking you!