1
0
-1

Hi,

 

Is there a way to set the minimum character length for a text field. There is a maximum but I don't see any options for minimum length. I'm trying to make the user key in a more specific format into a field. 

 

Thanks.

    CommentAdd your comment...

    2 answers

    1.  
      2
      1
      0

      Hi John Smith

      You can try using the "Custom Regular Expression" in "Default Validator" in each form field element properties.

      1. John Smith

        Is there anywhere I can find examples or a guide on how to use Custom Regular Expressions?

      2. John Smith

        Thanks I found some expressions online that I was able to use.

      CommentAdd your comment...
    2.  
      2
      1
      0

      Can't you try using JS on your form?

      1. John Smith

        I tried using the below JS in my form however, the process of submitting the form does not stop even with my validation being caught. The form still submits after I click OK on the alert. Am I missing anything essential in order to stop the form from submitting? <script type="text/javascript"> $(document).ready(function() { $('#assignmentComplete').click(function(){ var ulength = FormUtil.getValue("username"); try{ if (ulength.length < 6) { throw "Less than 6 characters"; } } catch(e){ alert("Username is " + e); } }); }); </script>

      CommentAdd your comment...