Virajsinh

HTML5 Validation With Custom Message

Aug 29th, 2020
1,448
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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>
RAW Paste Data