+ Start a Discussion
ALI 15ALI 15 

Validation for lightning:input Regex for apostrophe With only D,L and O characters


I need a validation for Apostrophe usage is to the letters D, L, and O. (e.g., O’Brien, D'Artagnan...)
I am using pattern="[ A-Za-z-_’]*"
Dhanya NDhanya N
Hi Ali,

Try using escape character something like \'
Reference: https://salesforce.stackexchange.com/questions/196769/regex-help-escaping-characters-and-matcher-method

Thanks,
Dhanya