Skip to content

Instantly share code, notes, and snippets.

@bugrym
Last active July 21, 2020 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bugrym/45a1bae066435ba5ce16c5f078d147a3 to your computer and use it in GitHub Desktop.
Save bugrym/45a1bae066435ba5ce16c5f078d147a3 to your computer and use it in GitHub Desktop.
Passport Series Validation
^[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