           if (!form.checkValidity()) {
                        event.preventDefault();
                        event.stopPropagation();
                    } else {
                        // Form is valid, you can submit it or perform other actions
                        event.preventDefault(); // Remove this line if you want to actually submit the form
                        alert('Form submitted successfully! (This is just a demo)');
                    }
                    
                    form.