Page 1 of 1

Minimum number of characters for submission

Posted: 23 Nov 2020
by Leslie
Hello !

I have an issue list, and I need to check this on submit :
If (Status == "Validation") and (AssignedTo == current user) and (number of characters in Comments is less than 10),
then show an alert message "Please write a full comment!".

I don't know how to count characters in a string of a multiline field.

Thank you in advance for your help !

Re: Minimum number of characters for submission

Posted: 30 Nov 2020
by Nikita Kurguzov
Dear Leslie,
Sorry, for the delay. The following code should work (you just need to add a check for other conditions as well):

Code: Select all

fd.onsubmit(function(){
  if(fd.field('MultipleLine').value().length < 10){
    alert("Leave a proper comment");
    return false;
  }
  return true;
});