0

We use the following parsley regex validation on our checkout page but mac device users (iPhones, etc.) are running into trouble when using apostrophes. Is there a way to allow for smart quote type elements in regex?

^(?!.*[0-9]{12,})[a-zA-Z0-9)(,'-/\&.#? ]*$

As an example, on a pc the validation allows

Father's Day

but when entered on an iPhone as

Father’s Day

validation comes back stating there is a problem.

TeeEric
  • 3
  • 2
  • I think you will have to look into [unicode & regex](https://stackoverflow.com/questions/280712/javascript-unicode-regexes). – Marc-André Lafortune Jun 07 '18 at 02:14
  • The unicode may have worked but I found that if I pasted in the quotes and apostrophe from a Word document that parsley would accept that as valid in regex. Not sure that's the ultimate solution but it works for my specific situation. – TeeEric Jun 08 '18 at 14:50

0 Answers0