Answers for "swift email regex"

0

swift email regex

func isValidEmail(_ email: String) -> Bool {        
    let emailRegEx = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}"

    let emailPred = NSPredicate(format:"SELF MATCHES %@", emailRegEx)
    return emailPred.evaluate(with: email)
}
Posted by: Guest on April-26-2022

Code answers related to "Swift"

Browse Popular Code Answers by Language