digits static method

ValidationRule<String> digits({
  1. required int digitLength,
  2. String? message,
})

Creates a Digits validation rule.

This rule checks if a string contains exactly digitLength digits. It can include a custom validation message.

Implementation

static ValidationRule<String> digits(
        {required int digitLength, String? message}) =>
    Digits(digitLength, message: message);