Validator
public protocol Validator
Validates a value.
-
Returns a boolean value indicating if the given value is valid.
Declaration
Swift
func isValid(_ value: String) -> Bool
Parameters
value
The value to validate.
Return Value
A boolean value indicating if the given value is valid.
-
Returns the maximum length for the given value.
Declaration
Swift
func maximumLength(for value: String) -> Int
Parameters
value
The value for which to determine the maximum length.
Return Value
The maximum length for the given value.