S
S
sbh2018-07-11 06:22:13
AJAX
sbh, 2018-07-11 06:22:13

How to validate fields before onclick?

There is a form, it has 2 required fields (there is a required tag).
The data is sent on the onclick event of the button via ajax.
Is there any way to combine form validation with html and data transfer via ajax?
Naturally, there is to remove the processing of pressing the button with js, then the form is validated by html and everything is buzzing.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Apostol63, 2018-07-11
@sbh

Yes, it all depends on what you need.
Do you want to check the form for valid/invalid characters?
On the number of these very characters?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question