passes method
Validates the value using the given context.
Returns true if valid, otherwise false.
Implementation
@override
FutureOr<bool> passes(ValidationContext context) {
final value = context.value;
if (value == null || value is! String) return false;
// Unicode letters, numbers, dash and underscore
return RegExp(r'^[\p{L}\p{N}_-]+$', unicode: true).hasMatch(value);
}