RegexModel.notAllowed constructor
None of the character groups in chars and none of the characters in
allow: RegexModel.notAllowed([RegexChar.whitespace, RegexChar.dot]).
Implementation
factory RegexModel.notAllowed(
List<RegexChar> chars, {
String allow = '',
String? title,
}) {
final banned = RegexModel.allowOnly(chars, allow: allow);
return RegexModel(
title: title ?? RegexLabels.current.none(_words(chars, allow)),
test: (value) =>
!value.runes.any((r) => banned.matches(String.fromCharCode(r))),
);
}