onValidate method
Implementation
@override
Future<FormsFieldException?> onValidate(T value) async {
if (value == null ||
value == false ||
value is Iterable && value.isEmpty ||
value is String && value.isEmpty ||
value is Map && value.isEmpty) {
return const FormsFieldRequiredException();
}
return null;
}