This library to verification the username and email .. etc
Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
`dependencies {
implementation 'com.github.majedalmoqbeli:verification-library:1.0'
}
`
You can call the Verification class in any activity , there is two function :
1 ) isValidUsername : this function to check if the user name is valid.
2 ) isValidEmail : this function to check if the email is valid.
if(Verification.isValidUsername(txt)){
Toast.makeText(this, "User Name Is Valid", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "Not Valid User Name", Toast.LENGTH_SHORT).show();
}