LengthValidator constructor

LengthValidator({
  1. required int minLength,
  2. required int maxLength,
  3. bool allowEmpty = false,
  4. bool trim = false,
  5. String? message,
})

Implementation

LengthValidator({required this.minLength, required this.maxLength, this.allowEmpty = false, this.trim = false, String? message}) {
  if (message != null) {
    this.message = message;
  } else {
    this.message = "长度介于$minLength和$maxLength之间";
  }
}