hasLen method

ContractValidations hasLen(
  1. String val,
  2. int len,
  3. String property,
  4. String message,
)

Implementation

ContractValidations hasLen(
    String val, int len, String property, String message) {
  if (val.isEmpty || val.length != len)
    addNotifications(
        ValidationNotification(property: property, message: message));

  return this;
}