Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

yup phone number

const phoneRegExp = /^((+[1-9]{1,4}[ -]*)|(([0-9]{2,3})[ -]*)|([0-9]{2,4})[ -]*)*?[0-9]{3,4}?[ -]*[0-9]{3,4}?$/

phoneNumber: Yup.string().matches(phoneRegExp, 'Phone number is not valid')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #yup #phone #number
ADD COMMENT
Topic
Name
5+5 =