validateStringPattern function

void validateStringPattern(
  1. String name,
  2. String? value,
  3. String pattern, {
  4. bool isRequired = false,
})

This function returns immediately without doing any checks. The regexes in the API definitions are PCRE regexes which are either invalid or produce incorrect results in an ECMA compliant regex engine.

Implementation

void validateStringPattern(
  String name,
  String? value,
  String pattern, {
  bool isRequired = false,
}) {
  return;
  /*if (value == null) {
    if (isRequired) {
      throw ArgumentError.notNull(name);
    } else {
      return;
    }
  }

  if (!RegExp(pattern).hasMatch(value)) {
    throw ArgumentError.value(
      value,
      name,
      'Argument does not conform to $pattern',
    );
  }*/
}