noSpecialChars method

Validator noSpecialChars({
  1. String allowed = '',
  2. String? message,
})

Ensures there are no special characters.

Implementation

Validator noSpecialChars({String allowed = '', String? message}) {
  _rules.add(
    NoSpecialCharsRule(message ?? _messages.noSpecialChars, allowed: allowed),
  );
  return this;
}