Last active
July 21, 2020 10:21
-
-
Save bugrym/45a1bae066435ba5ce16c5f078d147a3 to your computer and use it in GitHub Desktop.
Passport Series Validation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^[A-Z](?:[A-Z][0-9]{0,6})?$ regex for validate passport series format: XX000000 | |
let validatedString = NSPredicate(format:"SELF MATCHES %@", validationExpression) | |
return validatedString.evaluate(with: text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment