Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func isValidEmail(testStr:String) -> Bool {
- let emailRegEx = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}"
- let emailTest = NSPredicate(format:"SELF MATCHES %@", emailRegEx)
- return emailTest.evaluate(with: testStr)
- }
Add Comment
Please, Sign In to add comment