Answers for "show required message for non input"

3

change input required text html

<input type="text" id="username" required placeholder="Enter Name"
    oninvalid="this.setCustomValidity('Enter User Name Here')"
    oninput="this.setCustomValidity('')"  />
Posted by: Guest on June-18-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 "show required message for non input"

Browse Popular Code Answers by Language