Hi, I am using masking for a text field to restrict it to 16 characte

Hi,

I am using masking for a text field to restrict it to 16 characters in a dynamic grid.

is there a way to change the default error message thrown by masking?



OriginalPostID-207047

OriginalPostID-207047

  Discussion posts and replies are publicly visible

Parents
  • You can also create a function like this :

    function verifyMaxLength(fieldToCheck, sizeMax) {

              var textToCheck = FormAPI.getValue(fieldToCheck).id;

    if (textToCheck.length > sizeMax)
    return (false);
    else
    return (true);
    }
    And call it in the validation field like this : return verifyMaxLength('text23', 16); ('text'23' is the id of the field)
    Of course you can adatp it to check for a min value.
Reply
  • You can also create a function like this :

    function verifyMaxLength(fieldToCheck, sizeMax) {

              var textToCheck = FormAPI.getValue(fieldToCheck).id;

    if (textToCheck.length > sizeMax)
    return (false);
    else
    return (true);
    }
    And call it in the validation field like this : return verifyMaxLength('text23', 16); ('text'23' is the id of the field)
    Of course you can adatp it to check for a min value.
Children
No Data