Skip to content

Format assertions should be enabled for optional/ecmascript-regex.json #190

Closed
json-schema-org/JSON-Schema-Test-Suite
#751
@justin-tay

Description

@justin-tay

Describe the bug
Format assertions should be enabled for optional/ecmascript-regex.json as the \\a is not an ECMA 262 control escape test is a format "format": "regex" that expects the result to be invalid.

    {
        "description": "\\a is not an ECMA 262 control escape",
        "schema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "format": "regex"
        },
        "tests": [
            {
                "description": "when used as a pattern",
                "data": "\\a",
                "valid": false
            }
        ]
    }

https://github.com/json-schema-org/JSON-Schema-Test-Suite/blob/9fc880bfb6d8ccd093bc82431f17d13681ffae8e/tests/draft2020-12/optional/ecmascript-regex.json#L408-L421

Additional context
The current networknt json-schema-validator 1.4.0 doesn't pass the test but an upcoming version will.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions