IncludesRule class

Text must contain text.

Inheritance

Constructors

IncludesRule(String text, {String? message})

Properties

defaultMessage → String
Message template used when no custom message is set.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isAsync → bool
true when the rule needs checkAsync. Then use parseAsync.
no setterinherited
message → String?
Custom message for this rule. It wins over every other message.
finalinherited
name → String
Rule name. Also used as the issue code.
no setterinherited
params → Map<String, Object?>
Values for the message placeholders, like {'min': 3}.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String
final

Methods

apply(String value, RuleContext context) → bool
Run the rule and add an issue when it fails. Returns true on pass.
inherited
applyAsync(String value, RuleContext context) → Future<bool>
Async version of apply.
inherited
check(String value, RuleContext context) → bool
Return true when value is valid.
override
checkAsync(String value, RuleContext context) → Future<bool>
Async version of check. The default calls check.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJsonSchema() → Map<String, dynamic>
Extra JSON Schema keys, like {'format': 'email'}.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited