0 Replies Latest reply on Feb 25, 2012 9:17 PM by srinivas1506

    Validate that user should not enter more than specified number of digits/chars?

    srinivas1506 Level 1



      First case: I have placed a TEXT field on the form. Now i want to put the below validation,


      1) User has to enter only numbers (no decimals)


      2) Only 10 digits


      If not i need to



      1) Alert app.alert


      2) Make the field either CLEARIng or considering & resetting only the first 10 digits (if user entered more than 10 digits)


      2nd case: Same as above, a TEXT field, but, the data is with a DECIMAL notation, the allowed lenghts are as


      2 digits as prefix to decimal


      2 digits as suffix to decimal position


      example, 35.88


      Pls. let me knw the Java Script for these 2 cases or do you suggest me PATTERN validation if so, can i CLEAR or reset  and if so, pls. let me know under which TAB(Display / Edit / Data) i need to put the PATTERN validation?