File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -48,11 +48,16 @@ export const Form = defineComponent({
48
48
const shouldValidateField = ( target : EventTarget | null ) => {
49
49
const el = target as HTMLElement | null
50
50
if ( ! el ) return false
51
- return props . precognitive === true || typeof props . precognitive === 'object' || el . hasAttribute ?.( 'precognitive' ) || el . getAttribute ?.( 'data-precognitive' ) === 'true'
51
+ return (
52
+ props . precognitive === true ||
53
+ typeof props . precognitive === 'object' ||
54
+ el . hasAttribute ?.( 'precognitive' ) ||
55
+ el . hasAttribute ?.( 'data-precognitive' ) ||
56
+ el . getAttribute ?.( 'data-precognitive' ) === 'true'
57
+ )
52
58
}
53
59
54
60
const onMaybeValidate = ( e : Event ) => {
55
- if ( ! props . precognitive ) return
56
61
const evType = e . type as 'input' | 'change' | 'blur'
57
62
const types = Array . isArray ( props . validateOn ) ? props . validateOn : [ props . validateOn ]
58
63
if ( ! types . includes ( evType ) ) return
You can’t perform that action at this time.
0 commit comments