The re.match() method only looks for the regex at the beginning of the input, but the JSON Schema rules for "pattern" (as referenced by the Swagger/OpenAPI spec), state that "regular expressions are not implicitly anchored".
The result of using re.match() is that some valid values are rejected during client-side validation, if the pattern was written to match against something other than the start of the string. Using re.search() removes this implicit front-anchoring, so these values are not rejected.
This package is now deprecated and no longer receives update. Recent SDK stopped doing client side validation and pattern verification, meaning this is no longer a problem.
The re.match() method only looks for the regex at the beginning of the input, but the JSON Schema rules for "pattern" (as referenced by the Swagger/OpenAPI spec), state that "regular expressions are not implicitly anchored".
The result of using re.match() is that some valid values are rejected during client-side validation, if the pattern was written to match against something other than the start of the string. Using re.search() removes this implicit front-anchoring, so these values are not rejected.
A link for reference: http://json-schema.org/draft/2020-12/json-schema-validation.html#rfc.section.6.3.3