Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if input is valid js

//there are two ways to check the validity.

    inputElement.checkValidity() //returns true or false
    inputElement.validity //returns the validity-state object. 
    inputElement.validity.valid //returns true/false
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #input #valid #js
ADD COMMENT
Topic
Name
6+2 =