SuperValidationInt.minMax constructor

SuperValidationInt.minMax({
  1. int min = 0,
  2. int max = 9007199254740991,
  3. String? validateFunc(
    1. String?
    )?,
  4. String? minMessage,
  5. String? maxMessage,
  6. SuperValidationStore<String>? store,
})

Implementation

factory SuperValidationInt.minMax(
    {int min = 0,
    int max = 9007199254740991,
    String? Function(String?)? validateFunc,
    String? minMessage,
    String? maxMessage,
    SuperValidationStore<String>? store}) {
  return SuperValidationInt(
      validateFunc: (value) {
        final firstValidation = getMinMaxMessage(
            min: min,
            max: max,
            value: parseValue(value),
            minMessage: minMessage,
            maxMessage: maxMessage);
        return firstValidation ?? validateFunc?.call(value);
      },
      store: store);
}