Closed
Description
Hello,
I have a schema.json like below, and when I try to validate my json (also below) I'm receiving the Exception from the title.
schema.json:
{
"$schema": "http://json-schema.org/schema#",
"type": "string",
"pattern": "^\\#ref\\(.+\\)$"
}
json:
"ref"
Investigating the StringConstraint.php, on line 42 it has this code:
if (isset($schema->pattern) && !preg_match('#' . str_replace('#', '\\#', $schema->pattern) . '#u', $element)) {
which is replacing #
by \\#
and concatenating everything with #
-prefix and #u
-suffix.
Am I going something wrong or is it a bug?
Metadata
Metadata
Assignees
Labels
No labels