i am using the following code for phone number validation. But i am getting the following error. I cant able to proceed further. Help us to take it forward.
Using Swift 3
func validate(value: String) -> Bool { let PHONE_REGEX = "^\\d{3}-\\d{3}-\\d{4}$" let phoneTest = NSPredicate(format: "SELF MATCHES %@", PHONE_REGEX) let result = phoneTest.evaluate(with: value) return result }