Question Detail

How to get Regular expression to validate Addhar Card Number

6 years ago Views 11328 Visit Post Reply

Need help on validating Addhar Card Number with the regular expression. It's 12 digit number. in the following format. It can contain 0 to 9 digits.

Eg. 0000 0000 0000


Thread Reply

Anonymous

- 6 years ago

Try this regex:

^\d{4}\s\d{4}\s\d{4}$
Correct Answer

Anonymous

- 5 years ago

<form action="verify_aadhar.php">
Country code: <input type="text" name="addhar_Card"  pattern="^\d{4}\s\d{4}\s\d{4}$" title="Addhar Card">
<input type="submit">
</form>

Anonymous

- 5 years ago

You can use this code in Jquery also


^\d{4}\s\d{4}\s\d{4}$