Похожие чаты

Since the fields are hidden on accordion, so validation will

block the form but won't show which fields are actually empty

one way i thought out to find(":invalid") elements on submit button click, but since button click is handled by js to find and validate field that keeps submit from firing

thought out when (:invalid).length === 0 and then i submit the form, is there any better approach to handle this?

2 ответов

8 просмотров

add novalidate attribute to form and use JavaScript for form validation

well instead of hooking on button.onclick, you can hook on forb,onsubmit, and event.preventDefault() to have your custom logic on submitting the form

Похожие вопросы

Обсуждают сегодня

Карта сайта