1 Reply Latest reply on Dec 1, 2011 7:43 AM by DonMitchinson

    TextInput Validation question

    samschauhan Level 1



      I am looking to a validation for TextInput wherein the input has to be:


      1. At least 6 words (yes, not albhabets/characters). Maximum 10 words.

      2. Every word is of at least 2 characters.


      Please provide help/links if you know a solution.




        • 1. Re: TextInput Validation question
          DonMitchinson Level 2

          I think you can do what you want by using the valueCommit event of a TextInput control to trigger validation after a user enters information in the control


          From there I'd use an array from .text.split(' ') to get the list of space separated chars/words.


          You can then check the array length  for number of words

          and the length of each array element for the minimum 2 char requirement.


          My suggestion..