ConfirmRule
public class ConfirmRule<V> : ValidationRule<V> where V : Equatable
ConfirmRule is a subclass of ValidationRule that defines how a value that has to be equal
to another value is validated.
-
Initializes a
ConfirmationRuleobject to validate the value that should equal the value to be validated.Declaration
Swift
public init(confirmValue: V, message: String = "does not match with desired value.")Parameters
confirmValuefield to which original field will be compared to.
messageString of error message.
Return Value
An initialized object.
-
Used to validate a value.
Declaration
Swift
public override func validate(_ value: V?) -> String?Parameters
valueAny value to be checked for validation.
Return Value
Error Message. nil if validation is successful;
Stringif validation fails.
View on GitHub
ConfirmRule Class Reference