ajv-validator / ajv-validator/ajv-formats

date-time validation fails with ajv-formats@3.0.1

Aperta
#96 3 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
228
Fork
42
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I have a schema as:

```json
"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:

```json
[
{
"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`:

```json
"ajv": "^8.12.0",
"ajv-formats": "^3.0.1",
```

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.