Check if field is valid on blur if it is modified and not optional

This commit is contained in:
leigh-mil 2019-08-29 12:50:53 -04:00
parent 17fb264440
commit 444d256848

View File

@ -102,6 +102,8 @@ export default {
onBlur: function(e) {
if (!(this.optional && e.target.value === '')) {
this._checkIfValid({ value: e.target.value.trim(), invalidate: true })
} else if (this.modified && !this.optional) {
this._checkIfValid({ value: e.target.value.trim(), invalidate: true })
}
this.value = e.target.value.trim()