size static method

ValidationRule<String> size(
  1. int size, {
  2. String? message,
})

Creates a Size validation rule.

This rule checks if a string's length is equal to size. It can include a custom validation message.

Implementation

static ValidationRule<String> size(int size, {String? message}) =>
    Size(size, message: message);