Validate GSTIN syntax in HTML

0
180
html

This example explains how to validate Indian GSTIN syntax in html page.

<form action="action.php" method="post">
GSTIN: <input type="text" name="gstin" 
pattern="^(0[1-9]|[1-2][0-9]|3[0-9])([a-zA-Z]){5}([0-9]){4}([a-zA-Z]){1}([a-zA-Z0-9]){1}([a-zA-Z]){1}([a-zA-Z0-9]){1}?" required="" title="Please enter valid GSTIN" />
<input type="submit">
</form>

LEAVE A REPLY

Please enter your comment!
Please enter your name here