Rule
public protocol Rule
The Rule protocol declares the required methods for all objects that subscribe to it.
-
Validates text of a text field.
Declaration
Swift
func validate(value: String) -> BoolParameters
valueString of text to be validated.
Return Value
Boolean value. True if validation is successful; False if validation fails.
-
Displays error message of a text field that has failed validation.
Declaration
Swift
func errorMessage() -> StringReturn Value
String of error message.
Rule Protocol Reference