validateRequired static method

String? validateRequired(
  1. String? value, {
  2. String? message,
})

Implementation

static String? validateRequired(String? value, {String? message}) {
  if (value == null || value.isEmpty) {
    return message ?? 'Este campo es requerido';
  }
  return null;
}