ajv-validator / ajv-validator/ajv

proposal: coerceTypes from strings only

Aberta
#1,031 7 comentários 2 reações 0 responsáveis Ver no GitHub
enhancement thinking
Linguagem predominante
TypeScript
Estrelas
14.8k
Forks
1k
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

**What version of Ajv you are you using?**
6.10.0

**What problem do you want to solve?**
I want to convert values from queryStrings and url paramters into to their proper type. CoerceTypes `true` and `"array"` seem too eager to make changes I don't want such as converting `false` to `0` and vice versa.

**What do you think is the correct solution to problem?**
Add a new option for `coerceTypes`, maybe `"string"` or `"fromString"`.

**Will you be able to implement it?**
Probably not soon.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.