Advertisement
Virajsinh

HTML5 Validation With Custom Message

Aug 29th, 2020
2,094
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.25 KB | None | 0 0
  1. // HTML5 Validation Required Field Custom Message  
  2.  
  3. <input type='text' onkeydown="return AlphaSpace(event)" name="city_name" class="form-control" oninvalid="this.setCustomValidity('Please Enter City Name')" oninput="this.setCustomValidity('')" required>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement