validate method

  1. @override
String? validate(
  1. String? value
)
override

Validates the value and returns an error string if it fails, or null if it passes.

Implementation

@override
String? validate(String? value) {
  if (value == null || value.isEmpty) return null;
  try {
    base64Decode(value);
    return null;
  } catch (_) {
    return message;
  }
}