IncludesRule class
Text must contain text.
- Inheritance
-
- Object
- Rule<
String> - BuiltInRule<
String> - IncludesRule
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
-
truewhen the rule needs checkAsync. Then useparseAsync.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
trueon pass.inherited -
applyAsync(
String value, RuleContext context) → Future< bool> -
Async version of apply.
inherited
-
check(
String value, RuleContext context) → bool -
Return
truewhenvalueis 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