"error" is always undefined when calling "removeError"

This commit is contained in:
Corentin Sechet 2023-04-17 17:09:57 +02:00
parent d078755b15
commit f136682e42
1 changed files with 2 additions and 3 deletions

View File

@ -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)