GoConqr has a new look! Let us know what you think.

Module 6 of 33 · Media

Checkvalidity

Kostas Diakogiannis

Checkvalidity

Check Validity

Validating input fields is possible but it doesn't come from a black sorcery. 

It is possible through a specific JS function that every input DOM element has. The checkValidity() function. This functions checks for all the criteria an input field contains and returns a boolean value (true if the data is valid, false if not). 

Anytime this function returns a false value, triggers the 'invalid' event on the field.

Let's see an example of this.

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?