I'm seeing how I can validate a form with jQuery.
The form can be of "4 types" with what depending on the option that you choose at the beginning:
- "I would like to add a required attribute to the required fields, of course it will vary depending on which option the user chooses at the beginning."
The required, I add it in this way
$(function(){ $("#idcampo").prop('required',true); });
When the client fills everything, you can press a button that says: "Check Data"
-
This is where I would like to validate, before displaying a modal with a summary before sending, so that if all the "required" are filled in, then if it shows the modal with the summary.
-
If the required fields are not complete, mark them in red, this is not a problem, since I would add some class.
I think I've explained myself correctly, if someone thinks they do not understand my doubt, let me know so I can explain it better.
PS: The modal, I have it enabled in jQuery, simply, .show ()
Thanks in advance to the community. Greetings.