Answers for "how to set a error msg for a required field after setting attribute required"

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

Code answers related to "how to set a error msg for a required field after setting attribute required"

Browse Popular Code Answers by Language