Ayden
08/13/2018, 7:07 AMif (TextUtils.isEmpty(name)) {
textInputName.isErrorEnabled = true
textInputName.error = "Name cannot be empty."
}
if (TextUtils.isEmpty(email)) {
textInputEmail.isErrorEnabled = true
textInputEmail.error = "Email cannot be empty."
}
if (TextUtils.isEmpty(password)) {
textInputPassword.isErrorEnabled = true
textInputPassword.error = "Password cannot be empty."
}
if (TextUtils.isEmpty(password)) {
textInputConfirmPassword.isErrorEnabled = true
textInputConfirmPassword.error = "Confirm password cannot be empty."
}
if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {
textInputEmail.isErrorEnabled = true
textInputEmail.error = "Email format does not valid."
}
if (!(password.length >= 8)) {
textInputPassword.isErrorEnabled = true
textInputPassword.error = "Password length must be greater than 8 character."
}
if (!(confirmPassword.length >= 8)) {
textInputConfirmPassword.isErrorEnabled = true
textInputConfirmPassword.error = "Confirm password length must be greater than 8 character."
}
if (!(password.equals(confirmPassword))) {
textInputConfirmPassword.isErrorEnabled = true
textInputConfirmPassword.error = "Confirm Password does not match with Password"
}
}
gildor
08/13/2018, 7:09 AMgildor
08/13/2018, 7:10 AMAyden
08/13/2018, 7:37 AMgildor
08/13/2018, 7:40 AMAyden
08/13/2018, 7:41 AMAyden
08/13/2018, 7:59 AMgildor
08/13/2018, 8:09 AMAyden
08/13/2018, 12:55 PMAyden
08/13/2018, 12:56 PMAyden
08/13/2018, 2:16 PMinterface
first then just create abstract
class?Ayden
08/13/2018, 2:16 PMabstract
class directly?gildor
08/13/2018, 5:17 PM