"error" is always undefined when calling "removeError"
This commit is contained in:
parent
d078755b15
commit
f136682e42
|
@ -846,7 +846,7 @@ const LiveValidation = (function(){
|
|||
if (error) {
|
||||
this.showError(field, error)
|
||||
} else {
|
||||
this.removeError(field, error)
|
||||
this.removeError(field)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -865,8 +865,7 @@ const LiveValidation = (function(){
|
|||
this.hasError = error
|
||||
}
|
||||
|
||||
removeError(field, error) {
|
||||
if (error) return
|
||||
removeError(field) {
|
||||
this.errorEl.remove()
|
||||
field.setAttribute("aria-invalid", "false")
|
||||
field.setAttribute("aria-describedby", this.errorEl.id)
|
||||
|
|
Loading…
Reference in New Issue