PhoneNumberRule
public class PhoneNumberRule: RegexRule
PhoneNumberRule
is a subclass of Rule that defines how a phone number is validated.
-
Initializes a
PhoneNumberRule
object. Used to validate that a field has a valid phone number.Declaration
Swift
public convenience init(message : String = "Enter a valid 10 digit phone number")
Parameters
message
Error message that is displayed if validation fails.
Return Value
An initialized
PasswordRule
object, or nil if an object could not be created for some reason that would not result in an exception.