hasDigit<E> static method
Validates that the string contains at least one digit.
StringRules.hasDigit(error: 'Must contain a digit')
Implementation
static Rule<String, E> hasDigit<E>({required E error}) => PredicateRule(
predicate: (value) => value.contains(RegExp(r'\d')),
error: error,
);