FormRuleEquals class
FormRuleEquals This rule checks if the input data is equal to a specified data source.
Constructors
- FormRuleEquals({String? rule = "equals", String? message, required dynamic dataSource})
Properties
- data ↔ dynamic
-
Optional data associated with this rule.
getter/setter pairinherited
- dataSource → dynamic
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- message ↔ String?
-
The error message to display when validation fails, or a translation
key for it (the built-in rules default to
nylo.validation.*keys). Use{{attribute}}as a placeholder for the field name.getter/setter pairoverride -
messageArguments
→ Map<
String, String> -
Values for the rule-specific placeholders in a translated message,
e.g.
{"minLength": "8"}for{{minLength}}.no setterinherited - rule ↔ String?
-
The rule identifier (e.g., "email", "min_length", "required").
getter/setter pairoverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getMessage(
[String? attribute]) → String? -
Returns the formatted error message for this rule.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
dynamic data) → bool -
Validates the provided
dataagainst this rule.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited