-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Please add one more line for TextInputLayout so that it works fine:
isErrorEnabled = false
The error lies in the fact that after swelling from the bottom of the input to display the message, and then when we want to clear the error, the error zone remains
/**
* Apply Validation
*
* @return List<ValidationError> UI widget on which validation failed
*/
private fun applyValidation(): List<ValidationError> {
val errors = ArrayList<ValidationError>()
for (field in mValidationFields) {
val text = getText(field.key)
var status = true
for (rule in field.value) {
if (!rule.validate(text)) {
errors.add(ValidationError(field.key, rule.getError(field.key.context)))
status = false
break
}
}
//Set Error
if (status) setError(field.key, null) **<------- HERE**
}
setErrors(errors)
return errors
}
Metadata
Metadata
Assignees
Labels
No labels