match static method

String? match(
  1. String? value, {
  2. String? message,
  3. required String pattern,
})

Check if the value matches the given RegExp pattern.

Implementation

static String? match(String? value, {String? message, required String pattern}) =>
    value == null || value.isEmpty || validations.matches(value, pattern) == true ? null : message ?? 'The pattern "$pattern" does not match the input';