File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,9 @@ <h2 tabindex="-1" id="success2" class="success" hidden>Your submission was succe
38
38
< button value ="2 " name ="form "> submit</ button >
39
39
</ form >
40
40
41
- < h2 > only-validate-on-blur</ h2 >
41
+ < h2 > only-validate-on-blur with custom validity messages </ h2 >
42
42
< h2 tabindex ="-1 " id ="success3 " class ="success " hidden > Your submission was successful</ h2 >
43
- < form >
43
+ < form id =" custom2 " >
44
44
< p > All fields marked with * are required</ p >
45
45
46
46
< label for ="simple-field2 "> Desired username*:</ label >
@@ -86,7 +86,7 @@ <h2 tabindex="-1" id="success3" class="success" hidden>Your submission was succe
86
86
} )
87
87
88
88
form . addEventListener ( 'auto-check-start' , ( ) => {
89
- if ( form . id === 'custom' ) {
89
+ if ( form . id . includes ( 'custom' ) ) {
90
90
const { setValidity} = event . detail
91
91
setValidity ( '🔍 Checking validity...' )
92
92
}
@@ -96,7 +96,7 @@ <h2 tabindex="-1" id="success3" class="success" hidden>Your submission was succe
96
96
state . textContent = 'succeeded'
97
97
} )
98
98
form . addEventListener ( 'auto-check-error' , event => {
99
- if ( form . id === 'custom' ) {
99
+ if ( form . id . includes ( 'custom' ) ) {
100
100
const { setValidity} = event . detail
101
101
setValidity ( '🚫 Something went wrong. Please try again' )
102
102
}
You can’t perform that action at this time.
0 commit comments