@@ -203,7 +203,7 @@ <h2>Optional Notes</h2>
203203 'review-textarea' : ( value ) => {
204204 return value && value . length >= 50 && value . length <= 500 ;
205205 } ,
206- 'notes-textarea' : ( ) => true // Always valid (optional)
206+ 'notes-textarea' : ( ) => true , // Always valid (optional)
207207 } ;
208208
209209 function validateField ( textarea ) {
@@ -228,7 +228,7 @@ <h2>Optional Notes</h2>
228228
229229 function validateForm ( ) {
230230 let allValid = true ;
231- textareas . forEach ( textarea => {
231+ textareas . forEach ( ( textarea ) => {
232232 if ( textarea . id !== 'notes-textarea' ) {
233233 const isValid = validateField ( textarea ) ;
234234 if ( ! isValid ) {
@@ -241,13 +241,13 @@ <h2>Optional Notes</h2>
241241 }
242242
243243 // Add event listeners
244- textareas . forEach ( textarea => {
244+ textareas . forEach ( ( textarea ) => {
245245 // Mark as touched on blur
246246 textarea . addEventListener ( 'ionBlur' , ( e ) => {
247247 touchedFields . add ( textarea . id ) ;
248248 validateField ( textarea ) ;
249249 validateForm ( ) ;
250-
250+
251251 // Debug: Log to hidden aria-live region for testing
252252 const isInvalid = textarea . classList . contains ( 'ion-invalid' ) ;
253253 if ( isInvalid ) {
@@ -277,7 +277,7 @@ <h2>Optional Notes</h2>
277277
278278 // Reset button
279279 resetBtn . addEventListener ( 'click' , ( ) => {
280- textareas . forEach ( textarea => {
280+ textareas . forEach ( ( textarea ) => {
281281 textarea . value = '' ;
282282 textarea . classList . remove ( 'ion-valid' , 'ion-invalid' , 'ion-touched' ) ;
283283 } ) ;
@@ -297,4 +297,4 @@ <h2>Optional Notes</h2>
297297 validateForm ( ) ;
298298 </ script >
299299 </ body >
300- </ html >
300+ </ html >
0 commit comments