Forums

Validation messages

jaak 27 Jan, 2015
Text from FAQ:


In CFv5 the syntax has changed a little:

function customCheck(el){
  if ( !el.val().match(/Add regex for a test here/) ) {
    return false;
  } else {
    return true;
  }
}

And add the error message to the Title attribute of the element you are validating.



Error message in Title attribute results as one error message.
For multiple different error messages I tried this
 el.errors.push("Add an error message here");
inside if statement, but it did not work.
How can I set multiple error messages in Chronoform v5, if I have multiple different checks inside custom validation function?
GreyHead 27 Jan, 2015
Hi jaak,

I was looking at this today and I don't think that you can - I ended up using a 'combo' message in the Title box: 'A valid domain name is required;.

Bob
This topic is locked and no more replies can be posted.