Reputation: 19933
How would I validate with Javascript/jQuery that a phone number matches the format of +322123456?
Upvotes: 0
Views: 238
Reputation: 69915
Use regex to do that.
/\+32\d{8,9}/
Upvotes: 5
Reputation: 54050
try
\+32\d{8,9}
DEMO
Upvotes: 4
Reputation: 7305
You use this regex : \+32[0-9]{8}[0-9]+ to check that.
\+32[0-9]{8}[0-9]+