Created
July 18, 2017 02:25
-
-
Save wellingtoncosta/d16e765fce35109f13ee3f05cd6bda5b to your computer and use it in GitHub Desktop.
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
private static final String PHONE_PATTERN = "^\\([1-9]{2}\\)?([0-9]{9})$"; | |
@NotEmptyValidation(R.string.field_required) | |
@LengthValidation(min = 3, errorMessage = R.string.min_3_characters) | |
TextInputLayout nameLayout; | |
@OnlyNumberValidation(R.string.only_numbers) | |
TextInputLayout ageLayout; | |
@EmailValidation(R.string.invalid_email) | |
TextInputLayout emailLayout; | |
@PatternValidation(errorMessage = R.string.invalid_phone, pattern = PHONE_PATTERN) | |
TextInputLayout phoneLayout; | |
@PasswordValidation( | |
min = 3, | |
pattern = Patterns.LOWER_UPPER_CASE_NUMERIC_SPECIAL, | |
errorMessage = R.string.invalid_password | |
) | |
TextInputLayout passwordLayout; | |
@ConfirmPasswordValidation(R.string.passwords_not_match) | |
TextInputLayout confirmPasswordLayout; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment