fix phone number validation issue when creating a new client in cloud sites
what causes the issue:
1. creating new client
2. copy/pasted phone number from my contacts app (Mac Contacts). Pasted this (number obfuscated): (xxx) xxx-xxx
3. this resulted in validation error. I then tried editing the entry to remove the parenthesis, space, and dash. I tried formatting with only dashes, etc. but no matter what everything resulted in generic validation error
I fixed the issue by manually typing in the entire phone number rather than pasting it. I’m guessing some sort of hidden character or unicode incompatibility must have occurred when pasting.
1. at least provide more information on the expected format along with the validation error. Currently it simply says not a valid phone number.
2. better yet, use a js formatter to automatically strip invalid characters and conform the input to what you need. I see this all the time on other websites.
screen shot showing validation error, even after editing the number to what should be a valid format