Fixes blur behavior validation bug that failed to expose all validation errors on submission
This commit is contained in:
parent
88663296cd
commit
e962aaec62
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user