XValidatorsLocalization class abstract

A class responsible for localization of validation error messages.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Static Methods

on<T extends TextXValidationRule>(String func(TextXValidationRule)) → void
Registers a translation function for a specific TextXValidationRule type. This allows customizing the error message for each validation rule type.
translate(TextXValidationRule rule) String
Translates a TextXValidationRule into a localized error message using the registered translation function. If no translation function is registered for a specific rule type, it falls back to the default toString() representation.