EasyValidator.notEqualLength constructor

const EasyValidator.notEqualLength(
  1. int length, [
  2. String? errorMessage
])

A factory constructor for creating a NotEqualLengthValidator. The length parameter specifies the length that the value being validated should not have. The errorMessage parameter is an optional error message to be displayed if the validation fails. Example usage:

final validator = NotEqualLengthValidator(5,'Value must not have a length of 5');
String? result = validator.validate("Hello");
print(result); // 'Value must not have a length of 5'

Implementation

const factory EasyValidator.notEqualLength(int length,
    [String? errorMessage]) = NotEqualLengthValidator;