Skip to content

Commit

Permalink
fix: reset validity when setting value to undefined #118
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanjones243 committed Dec 18, 2024
1 parent 86b90a0 commit 14d786d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/form-validation/src/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ export default class AuroFormValidation {
this.validateType(elem);
this.validateAttributes(elem);
}
} else if (elem.value === undefined) {
// Reset the validity state if input is programmatically reset
elem.validity = undefined;
elem.isValid = false;
}

if (this.auroInputElements && this.auroInputElements.length > 0) {
Expand Down

0 comments on commit 14d786d

Please sign in to comment.