hasExactLengthIfNotNullOrEmpty method

ContractValidations hasExactLengthIfNotNullOrEmpty(
  1. String text,
  2. int len,
  3. String property,
  4. String message,
)

Implementation

ContractValidations hasExactLengthIfNotNullOrEmpty(
    String text, int len, String property, String message) {
  if (text.isNotEmpty && text.length != len)
    addNotifications(
        ValidationNotification(property: property, message: message));

  return this;
}