Skip to content

Instantly share code, notes, and snippets.

@1gravity
Last active April 7, 2021 18:04
Show Gist options
  • Save 1gravity/98d15edabd058d97f6fdfb37a8682e62 to your computer and use it in GitHub Desktop.
Save 1gravity/98d15edabd058d97f6fdfb37a8682e62 to your computer and use it in GitHub Desktop.
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