Hello,
I tried to add a custom validation for a field but it doesn't work.
I have added to the field for validation a "custom function" with the name "customCheck"
Then in the onload Event before everything else I have added a Load Javascript block.
Inside the block I have added my function:
Am I doing something wrong? Nothing different happened. Can somebody help?
Thanks a lot in advance.
I tried to add a custom validation for a field but it doesn't work.
I have added to the field for validation a "custom function" with the name "customCheck"
Then in the onload Event before everything else I have added a Load Javascript block.
Inside the block I have added my function:
function customCheck(el){
if ( !el.value.test(/[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}/) ) {
el.errors.push("Please enter a valid IBAN!");
return false;
} else {
return true;
}
}
Am I doing something wrong? Nothing different happened. Can somebody help?
Thanks a lot in advance.
Hello Quidong,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How do I use Custom Serverside validation?
How can I add a Custom Client side validation?
How can I run Auto and Custom Serverside Validation together?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How do I use Custom Serverside validation?
How can I add a Custom Client side validation?
How can I run Auto and Custom Serverside Validation together?
P.S: I'm just an automated service😉
Hello,
I checked the links. The second link handles the topic, but the solution doesn't work.
Can somebody help?
Thanks a lot in advance.
I checked the links. The second link handles the topic, but the solution doesn't work.
Can somebody help?
Thanks a lot in advance.
Please try to edit the code a little bit since this is v5:
Your error message should be added to the "Title" field in your element settings!
Additionally, this is a custom client side validation, not server side!
Regards,
Max
function customCheck(el){
if ( !el.val().match(/[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}/) ) {
return false;
} else {
return true;
}
}
Your error message should be added to the "Title" field in your element settings!
Additionally, this is a custom client side validation, not server side!
Regards,
Max
This topic is locked and no more replies can be posted.