hasMaxLen method

ContractValidations hasMaxLen(
  1. String val,
  2. int max,
  3. String property,
  4. String message,
)

Implementation

ContractValidations hasMaxLen(
    String val, int max, String property, String message) {
  if (val.isEmpty || val.length > max)
    addNotifications(
        ValidationNotification(property: property, message: message));

  return this;
}