Last active
April 7, 2021 18:04
-
-
Save 1gravity/98d15edabd058d97f6fdfb37a8682e62 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
txtPassword.validator() | |
.nonEmpty() | |
.atleastOneNumber() | |
.atleastOneSpecialCharacters() | |
.atleastOneUpperCase() | |
.addErrorCallback { | |
txtPassword.error = it | |
// it will contain the right message. | |
// For example, if edit text is empty, | |
// then 'it' will show "Can't be Empty" message | |
} | |
.check() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment