How to validate the phone number in the form field to be in this format: XXX-XXX-XXXX | XM Community
Skip to main content

Hello all!
How to validate the phone number in the form field to be in this format: XXX-XXX-XXXX
Thank you in advance.

Add a custom validation to match the following regex:
/[0-9]{3}-[0-9]{3}-[0-9]{4}$/


Leave a Reply