Validation errors not showing up for type day

Aberta
#572 2 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
38/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
react, typescript
Domínio
frontend

Direção de pesquisa

Comece pela reprodução vinculada no CodeSandbox e reproduza o erro ausente de day-component durante a digitação e o envio. Rastreie a renderização do erro de validação e a aplicação da classe de day-component, comparando-as com o comportamento de textfield. Está concluído quando o erro personalizado estiver visível em ambos os fluxos sem o workaround.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

help wanted

I have a form with two components, one of type day, with day, month and year required, and one of type textfield, required. Both have a custom error message.

Both while typing and on submission, errors are not shown for the day component. I tried calling the submit function and I noticed the error is actually thrown. It seems like the library is not adding the correct class to the element in order for the error to be shown.

To Reproduce
Steps to reproduce the behavior:

  1. Go to repro: https://codesandbox.io/p/sandbox/modest-worker-mtztn2
  2. Click on "verify"
  3. See that error on day is not shown
  4. Click on "vertify with workaround"
  5. See that error on day is now shown thanks to the ugly workaround I implemented

Expected behavior
Errors on day component should be shown both while typing and on submit

Screenshots
Without workaround:
image
With workaround:
image

Desktop (please complete the following information):

  • OS: Tested on Windows 10 and macOS 14.5
  • Browser chromium based
  • Version 127.0.6533.73

Additional context
The version of the libs in the repro are the exact ones I use in my project

Linguagem predominante
TypeScript
Estrelas
371
Forks
309
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de formio/react

Todas as issues de formio/react

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

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