InputValidation.maxLength constructor

InputValidation.maxLength(
  1. int length, {
  2. String? errorMsg,
  3. bool mustFill = false,
})

最大长度校验 / Maximum length validation

Implementation

factory InputValidation.maxLength(int length, {String? errorMsg, bool mustFill = false}) {
  return InputValidation(
    mustFill: mustFill,
    maxLength: length,
    errorMsg: errorMsg ?? "最多$length个字符",
  );
}