validate method
Validates all fields and returns true if valid
Implementation
Map<String, String?> validate() {
__.in_('validate');
try {
checkInitialized('BaseMessage');
final errors = validateFields();
__.info('Validation complete. Error count: ${errors.length}');
return errors;
} catch (e, stackTrace) {
__.severe('Validation failed', e, stackTrace);
if (e is hujFrameworkException) {
rethrow;
}
throw hujFrameworkException(
message: 'Validation failed',
hujType: hujErrorType.framework,
originalError: e,
);
} finally {
__.out_('validate');
}
}