form validation for mobile number code example Example: add html validation to mobile number <input type="text" pattern="[789][0-9]{9}">