You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some validator functions, we were checking the existence
of min and max values in the field schema using
!isNil(field.fieldOptions.min) and !isNil(field.fieldOptions.max).
However, some fields might have very simple configuration which
doesn't include fieldOptions object, meaning that this code
will throw an error
```js
TypeError: Cannot read property 'min' of undefined
```
which vue throws as something like
```js
vue.esm.js:629 [Vue warn]: Error in event handler for "validate-fields": "TypeError: Cannot read property 'min' of undefined"
```
To guard against this, we need to first make sure that
fieldOptions also exists before we try to check whether attributes in it
are defined.
This was already present in `number` validator, but was missing in
`date`, `array` and `string`.
0 commit comments