EndsWithRule class

A validation rule that checks if a field value ends with a specific suffix.

Inheritance

Constructors

EndsWithRule(String suffix, {String? errorMessage})
Creates an EndsWithRule with the given suffix and optional errorMessage.
const

Properties

defaultMessage Map<String, String>
Default error messages for different locales.
no setteroverride
errorMessage String?
The error message to be displayed if validation fails.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suffix String
The suffix that the field value must end with.
final

Methods

isValid(BuildContext context, String? value) String?
Validates if the value ends with the specified suffix.
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