Hello,
It is possible to validate an email address entered into the igTextEditor (or possibly igMask) on the client side?
Thank You,
Randy
I see there is a RexEx option under ValidatorOptions. That would appear to be the solution, unless there is a better one.
Hello Randy,
Thank you for posting in our community!
One possible solution for email validating is using regular expressions:
$.ig.loader(function () {
var pattern6 = /^[a-zA-Z]{1}[a-zA-Z0-9_\.\-]*\@\w{2,10}\.\w{1,10}$/;
$('#maskEditor1').igTextEditor({
validatorOptions: {
onblur: true,
onchange:true,
regExp: pattern6,
},
required: false,
width: 395,
});
The regular expression from the code snippet above validates successfully emails which start with a letter, might contain letters, digits, “.”, “-” and “_” only and ends with @ followed by string of letters followed by “.” followed by string of letters.
Attached is the whole sample for your reference.
If any additional questions arise feel free to contact me again.