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.