getValidationErrors method
Get validation errors Override in subclasses to provide specific error messages
Implementation
@override
List<String> getValidationErrors() {
final errors = super.getValidationErrors();
if (aggregateId.isEmpty) {
errors.add('Aggregate ID cannot be empty');
}
if (aggregateType.isEmpty) {
errors.add('Aggregate type cannot be empty');
}
return errors;
}