StringMixin<B extends BaseBuilder<B, T> , T> mixin
Mixin providing string-specific validation methods.
- Superclass constraints
- BaseBuilder<
B, T>
- BaseBuilder<
- Mixin applications
- Available extensions
Properties
- chain → Chain
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isNullable → bool
-
finalinherited
- isOptional → bool
-
finalinherited
- negated ↔ bool
-
getter/setter pairinherited
- not → B
-
Return a negated version of the builder
(the negation flag is consumed by the next added validator)
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- self → B
-
no setterinherited
Methods
-
add(
IValidator validator, {String? message}) → B -
Add a validator to the chain.
inherited
-
boolString(
{String? message}) → B - Validate that the string can be parsed as a boolean.
-
build(
) → IValidator -
Build resulting validator.
inherited
-
collapseWhitespace(
) → B - Normalize the string by collapsing multiple whitespace characters into single spaces.
-
copyWith(
{bool? nullable, bool? optional}) → IValidator -
inherited
-
deepEq(
T value, {String? message}) → B -
Require the value to be deeply equal to the specified value.
inherited
-
doubleString(
{String? message}) → B - Validate that the string can be parsed as a double.
-
email(
{String? message}) → B - Validate that the string is a valid email address.
-
eq(
T value, {String? message}) → B -
Require the value to be equal to the specified value.
inherited
-
error(
String message) → B -
Override final error message (retains codes).
inherited
-
intString(
{String? message}) → B - Validate that the string can be parsed as an integer.
-
isDate(
{String? message}) → B - Validate that the string is a valid DateTime format.
-
isNotValid(
dynamic value) → bool -
inherited
-
isNotValidAsync(
dynamic value) → FutureOr< bool> -
inherited
-
isValid(
dynamic value) → bool -
inherited
-
isValidAsync(
dynamic value) → FutureOr< bool> -
inherited
-
lowerCase(
{String? message}) → B - Validate that the string contains only lowercase characters.
-
matches(
RegExp pattern, {String? message}) → B - Validate that the string matches the provided regular expression pattern.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
nullable<
_> ({String? message}) → B -
Mark current chain nullable (null accepted as valid).
inherited
-
numString(
{String? message}) → B - Validate that the string can be parsed as a number.
-
oneOf(
Iterable< T> values, {String? message}) → B -
Require the value to be one of the specified options.
inherited
-
optional<
_> () → B -
Mark current chain optional (skipped when key absent).
inherited
-
strictUrl(
{String? message}) → B - Validate that the string is a valid URL with strict requirements.
-
toLowerCase(
) → B - Convert the string to lowercase.
-
toString(
) → String -
A string representation of this object.
inherited
-
toUpperCase(
) → B - Convert the string to uppercase.
-
trim(
) → B - Normalize the string by trimming whitespace from both ends.
-
upperCase(
{String? message}) → B - Validate that the string contains only uppercase characters.
-
url(
{String? message, bool strict = false}) → B - Validate that the string is a valid URL.
-
validate(
dynamic value, {bool? exists}) → Result -
Convenience validate (sync only chain).
inherited
-
validateAsync(
dynamic value, {bool? exists}) → Future< Result> -
Convenience validateAsync (mixed / async).
inherited
-
validateOrThrow(
dynamic value) → Result -
inherited
-
validator(
dynamic value) → FutureOr< Result> -
inherited
-
wrap(
IValidator fn(IValidator), {String? message}) → B -
Wrap the current chain with a custom function.
inherited
Operators
-
operator &(
IValidator other) → IValidator -
Available on IValidator, provided by the EskemaEskValidatorOperations extension
Combines two validators with a logical AND, same as using all -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator >(
Expectation error) → IValidator -
Available on IValidator, provided by the EskemaEskValidatorOperations extension
Returns a new validator that will return theerror
message if the validation fails -
operator |(
IValidator other) → IValidator -
Available on IValidator, provided by the EskemaEskValidatorOperations extension
Combines two validators with a logical OR, same as using any