Modul 2 von 33 · Medien
Forms
JS Form Validation
As you have probably guessed, not all data that comes or stems from an HTML form should be accepted. Sometimes we want to accept data from the user that matches specific criteria. That means that most of the time the data that comes from a form should be validated before submitted.
Normally a validation of a form happens on every input field on the submit event. But also can be specified otherwise as we will see later.