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) return false;
if (value is int) return true;
if (value is String && int.tryParse(value) != null) return true;
return false;
}