You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.
Iranianpostalcodevalidationthisissomerulesaboutthis regex:
It's all numeric10 digit countdon'tuse0infirst5digitdon't use 2 in postal codeFirst 4 digit is not the sameThe 5th digit cannot be 5all digits aren'tthesameThefollowingregexsatisifesyourconditions:
\b(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}\b
Explanation:
\b-awordboundary(?!(\d)\1{3})-negativelookaheadtomakesurethatthefirst4digitsarenotthesame.[13-9]{4}-matches4occurrencesofallthedigitsexcept0and2[1346-9]-matchesasingledigitthatisnota0,2or5[013-9]{5}-matches5occurrencesofallthedigitsexcept2
\b-awordboundary
PersianUtils by Typescript
[ ] Persian.js
[ ] Rial.js
[ ] Check Iranian National Code Validity
[ ] Iranian postal code validation
[ ] NumToPersian
I made PersianToolkit for this purpose.
The text was updated successfully, but these errors were encountered: