ISBNRule
public class ISBNRule: Rule
ISBNRule is a subclass of Rule. It is used to verify whether a field is a valid ISBN number.
-
Initializes a
ISBNRuleobject to verify that field has text that is a ISBN number.Declaration
Swift
public init(message: String = "Enter valid ISBN number")Parameters
messageString of error message.
Return Value
An initialized object, or nil if an object could not be created for some reason that would not result in an exception.
-
Method used to validate text field.
Declaration
Swift
public func validate(value: String) -> BoolParameters
valueString to checked for validation.
Return Value
Boolean value. True if validation is successful; False if validation fails.
-
Method used to dispaly error message when text field fails validation.
Declaration
Swift
public func errorMessage() -> StringReturn Value
String of error message.
ISBNRule Class Reference