FullNameRule
public class FullNameRule : Rule
FullNameRule is a subclass of Rule that defines how a full name is validated.
-
Initializes a
FullNameRuleobject that is used to verify that text in text field is a full name.Declaration
Swift
public init(message : String = "Please provide a first & last name")Parameters
messageString of error message.
Return Value
An initialized
FullNameRuleobject, or nil if an object could not be created for some reason that would not result in an exception. -
Used to validate a text field.
Declaration
Swift
public func validate(value: String) -> BoolParameters
valueString to checked for validation.
Return Value
A boolean value. True if validation is successful; False if validation fails.
-
Used to display error message of a text field that has failed validation.
Declaration
Swift
public func errorMessage() -> StringReturn Value
String of error message.
FullNameRule Class Reference