FullNameRule
public class FullNameRule : ValidationRule<String>
FullNameRule
is a subclass of ValidationRule
that defines how a full name is validated.
-
Initializes a
FullNameRule
object that is used to verify that text in field is a full name.Declaration
Swift
public override init(message: String = "is not a valid full name.")
Parameters
message
String of error message.
Return Value
An initialized
FullNameRule
object. -
Used to validate a name String.
Declaration
Swift
public override func validate(_ value: String?) -> String?
Parameters
value
String to be checked for validation.
Return Value
Error Message. nil if validation is successful;
String
if validation fails.