Answers for "assign an input a validation message"

2

how to change input required message

<input class="form-control" type="email"  required="" placeholder="username"
 oninvalid="this.setCustomValidity('Please Enter valid email')"
 oninput="setCustomValidity('')"></input>
Posted by: Guest on December-30-2020
0

input show validation message

// Validate emai

var applicationForm = document.getElementById("applicationForm");    
if (applicationForm.checkValidity()) {
  applicationForm.submit();
} else {
  applicationForm.reportValidity();
}
Posted by: Guest on November-24-2020

Code answers related to "assign an input a validation message"

Browse Popular Code Answers by Language