PhoneNumberRule

public class PhoneNumberRule: RegexRule

PhoneNumberRule is a subclass of Rule that defines how a phone number is validated.

  • Method used to initialize PhoneNumberRule object. - parameter message: Error message that is displayed if validation fails. - returns: An initialized PasswordRule object, or nil if an object could not be created for some reason that would not result in an exception.

    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.