This is a sample application that uses a validator

https://github.com/vekexasia/android-edittext-validator