1
0
mirror of synced 2024-11-22 05:16:05 +03:00

Fixes blur behavior validation bug that failed to expose all validation errors on submission

This commit is contained in:
Justin Schroeder 2018-02-01 11:02:58 -05:00
parent 88663296cd
commit e962aaec62
3 changed files with 4 additions and 6 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@ -112,9 +112,7 @@ export default {
return errors
},
updateFormValidation () {
this.fields.map(field => {
console.log(field.validationLabel || field.label || field.name)
})
console.log(this.fields)
this.fields.map(async field => this.validateField({
field: field.name,
validation: field.validation,
@ -125,7 +123,7 @@ export default {
if (this.hasErrors) {
this.forceErrors = true
} else {
alert('submitting form')
this.$emit('submit', Object.assign({}, this.values))
}
}
}

View File

@ -233,7 +233,7 @@ export default {
shouldShowErrors () {
let show = this.form.shouldShowErrors
if (this.form.behavior === 'blur') {
show = this.errorBlurState
show = show || this.errorBlurState
}
if (this.showErrors === false || this.showErrors === true) {
show = this.showErrors