RegexRule
open class RegexRule : RuleType
RegexRule presents a regex that a text field value should follow.
Version
1.8.0Date
08/10/21-
Initialize the rule
Declaration
Swift
public init(regex: String, message: String)Parameters
regexThe regex expression.
messageThe error message to apply.
-
Initialize the rule
Declaration
Swift
public init(regexes: [String], message: String)Parameters
regexesA list of regexes. The rule will pass if any of them is matched.
messageThe error message to apply.
-
Declaration
Swift
public func isValid(value: String?) -> String?
RegexRule Class Reference