Monday, June 27, 2011

Re: Fast way for email, phone input validation


--
salaam
it ok this method 
is only valid for US phone numbers.  It takes no account
of country codes or other international phone formats.

but this format is US phone format
ok
Possible change your format Depending on the phone number isA

for example (1)
    public static final String RGEX_PHONE_ONLY = "^\\(?(\\d{3}-)\\)?(\\d{3}-)?(\\d{4})$";

is true 111-111-1111

for example (2)

public static final String RGEX_PHONE_ONLY = "^\\(?(\\d{4}-)\\)?(\\d{4}-)?(\\d{3})$";

is true 1111-1111-111

for example (3)

public static final String RGEX_PHONE_ONLY = "^\\(?(\\d{2}-)\\)?(\\d{3}-)?(\\d{4})$";

is true 11-111-1111

thanks
mohammad salah
Take Your Time Man


------------------------------------------

Regard: Mohamed salah hasan
Mobile :+20106594094
tel     :+2024460320


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment