validateBase64 method
Validate base64 format.
Implementation
void validateBase64(String field, String value) {
try {
final decoded = base64Decode(value.replaceAll(RegExp(r'\s+'), ''));
if (decoded.isEmpty) {
throw const FormatException('Empty base64 string');
}
} catch (e) {
throw JupiterValidationException(
'Invalid base64 format for "$field"',
field: field,
error: e,
);
}
}