Untitled
Anonymous
plain_text
06/27/2024 9:52 AM
712 B
18
Indexable
Validator.register('alphaNumericCheck', function (value, requirement) {
// Regex to detect HTML tag pattern
var htmlPattern = /<[^>]+>/;
// Updated alphanumeric check pattern with additional symbols, including newline characters
var alphaNumericPattern = /^[a-zA-Z0-9\n…—%&() ,.;:'"+\$-“”’•#\/<>@?!]+$/;
return !htmlPattern.test(value) && alphaNumericPattern.test(value);
});
updte the above code to throw error for [a-z][A-Z][0-9][\n…—%&(),.;:'"-+$“”’•#/<>@] and html tagsEditor is loading...
Leave a Comment