In class

A validation rule for checking if a value is within a specified list of items.

The In class is a concrete implementation of the FormifyRule abstract class. It is used to validate whether a value is contained within a specified list of items.

This rule checks if the input value is included in the provided items list. If the value is not found within the list, an error message is generated.

Inheritance

Constructors

In(List<String> items)
Creates an instance of the In validation rule.

Properties

hashCode int
The hash code for this object.
no setterinherited
items List<String>
The list of items that the value should be contained within.
final
message String
Gets the error message associated with the In rule.
getter/setter pairinherited-setteroverride-getter
ruleKey String
The unique key identifying the validation rule.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildMessage(String attribute, String input, {String onExtra(String)?}) String
Builds a validation error message by replacing placeholders in the error message template.
inherited
call(String attribute, String value) String?
Validates whether a value is within the specified list of items.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

key → const String
The unique identifier for the In validation rule.