Check if has pattern
bool hasPattern({required String value, required List<RegExp> patterns}) { final hasPattern = patterns.any((RegExp r) => r.hasMatch(value)); return hasPattern; }