minLength static method
Creates a validation rule that enforces a minimum string length.
Returns an error message if the string length is less than min.
If message is not provided, uses a default message.
Example:
Validations.minLength(8, 'Password must be at least 8 characters')
Implementation
static String Function(String?) minLength(int min, [String? message]) {
return (String? value) => (value?.length ?? 0) < min ? message ?? 'Must be at least $min characters' : '';
}