required static method
Validates that field is not empty
fieldName is used in error message
Implementation
static String? required(String? value, {String fieldName = 'Este campo'}) {
if (value == null || value.isEmpty) {
return AppStrings.format(
AppStrings.fieldRequired,
[fieldName],
);
}
return null;
}