valid method

void valid()

Implementation

void valid() {
  if (required && isEmpty) {
    throw 'El dato "$label" es requerido';
  }
}