ISBNRule
public class ISBNRule : ValidationRule<String>
ISBNRule is a subclass of ValidationRule. It is used to verify whether a value is a valid ISBN number.
-
Initializes a
ISBNRuleobject to verify that value is a ISBN number.Declaration
Swift
public override init(message: String = "is not a valid ISBN number.")Parameters
messageString of error message.
Return Value
An initialized object.
-
Method used to validate the provided value.
Declaration
Swift
public override func validate(_ value: String?) -> String?Parameters
valueAny value to checked for validation.
Return Value
Error Message. nil if validation is successful;
Stringif validation fails.
View on GitHub
ISBNRule Class Reference