AlbumValidator class final
Validator for album tag values.
This validator ensures that album values are not empty or whitespace-only.
Error keys:
empty: Value is empty or contains only whitespace
Example usage:
const validator = AlbumValidator();
final error = validator.validate('Abbey Road'); // null (valid)
final error2 = validator.validate(''); // {empty: {...}}
- Inheritance
-
- Object
- TagValidator<
String> - TextValidator
- AlbumValidator
Constructors
- AlbumValidator()
-
Creates a new album validator.
const
Properties
Methods
-
formatErrorMessage(
Map< String, dynamic> error) → String -
Formats the error map into a human-readable error message.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
String? value) → Map< String, dynamic> ? -
Validates the given value.
inherited
-
validateOrThrow(
String value) → String -
Validates the value and throws an ArgumentError if invalid.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited