regex - How to validate alphanumeric sender id for Twilio -


i trying figure out how can validate alphanumeric sender id sending sms via twilio? tried sending sms numeric sender(not twilio verified number, random numeric sender id) , twilio accepted message. not sure twilio support in alphanumeric sender id.

it helpful if twilio api provides regular expression pattern matching or validate sender using api ?

any in regard highly appreciated.

twilio developer evangelist here.

you able find documentation alphanumeric sender id's on what alphanumeric sender id , how started? page. specifically, if under what characters can use sender id? find following:

you may use combination of 1 11 letters, a-z , numbers, 0-9. both lowercase , uppercase characters supported spaces. 1 letter , no more 11 alphanumeric characters may used.

a regular expression vary depending on programming language you're using, , in many cases find language have helpers things.

also have @ list of countries functionality supported.

depending on language you're using, following pattern should want, said before may wanna add limitations string using language of choice.

/^(?=.*[a-za-z])(?=.*[a-za-z0-9])([a-za-z0-9 ]{1,11})$/m

a live version can seen here.

hope helps you


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -