JSFiddle - React, Tailwind, and code Playground

HTML

<form>
  <h2>Phone Number Validation</h2>
  <label for="phonenum">Phone Number:</label><br/>
  <input id="phonenum" type="tel" pattern="^\+91(7\d|8\d|9\d)\d{9}$" required >
  
  <input type="submit" value="Submit">
</form>