Skip to content

Commit

Permalink
🐛 Make html validation at the end (#1196)
Browse files Browse the repository at this point in the history
* 🐛 Make html validation at the end

* 🚨 Fix linter warning
  • Loading branch information
SusCasasola committed Sep 19, 2023
1 parent 8930e5a commit 7713b21
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/form/HdInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,6 @@ export default {
return true;
},
validate(value = this.value) {
if (!this.$refs.input.checkValidity()) {
return this.showError(this.customErrorMessage || this.t.FORM.VALIDATION.GENERAL);
}
if (this.required && !this.isFilled) {
return this.showError(this.t.FORM.VALIDATION.REQUIRED);
}
Expand All @@ -220,6 +216,10 @@ export default {
if (this.customRules.length) {
return this.validateCustomRules(value);
}
if (!this.$refs.input.checkValidity()) {
return this.showError(this.customErrorMessage || this.t.FORM.VALIDATION.GENERAL);
}
}
return this.hideError();
Expand Down

0 comments on commit 7713b21

Please sign in to comment.