hasPattern method

bool hasPattern({
  1. required String value,
  2. required List<RegExp> patterns,
})

Check if has pattern

Implementation

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