Created
December 30, 2017 01:52
-
-
Save aasumitro/05a421cf1e6cbf80f5a25e1456118b69 to your computer and use it in GitHub Desktop.
email, phone and username pattern
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//validation | |
val EMAIL_PATTERN = ("^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@" | |
+ "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$") | |
val USERNAME_PATTERN = ("^[a-z0-9_-]{3,15}\$") | |
val PHONE_PATTERN = ("^[+(00)][0-9]{6,14}$") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment