Skip to content

date-time validation fails with [email protected] #96

@ghost

Description

I have a schema as:

          "createDate": {
            "type": "string",
            "format": "date-time"
          },

It does not validate the below date:

        "createDate": "2024-04-15T00:00:00",

It fails on validation with the error below:

[
    {
        "instancePath": "/createDate",
        "schemaPath": "#/properties/createDate/format",
        "keyword": "format",
        "params": {
            "format": "date-time"
        },
        "message": "must match format \"date-time\""
    }
]

My settings are as below:

  • package.json:
    "ajv": "^8.12.0",
    "ajv-formats": "^3.0.1",

I just had to downgrade to "ajv-formats": "2.1.1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions