NotEmptyValidator class

Validates that a string is not blank (empty or whitespace-only).

Inheritance

Constructors

NotEmptyValidator([String message = 'Must not be empty'])

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
validationErrorMessage String
The error message to show if validation fails.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toSchemaProperties() Map<String, dynamic>
Returns OpenAPI-compatible JSON Schema constraints contributed by this validator (e.g. {'minLength': 8}, {'format': 'email'}).
override
toString() String
A string representation of this object.
inherited
validate(dynamic value) bool
Validates the provided value.
override

Operators

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