Validation errors not showing up for type day

Đang mở
#572 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu với bản tái hiện CodeSandbox được liên kết và tái hiện lỗi day-component bị thiếu trong quá trình nhập và gửi. Theo dõi cách hiển thị lỗi xác thực và việc áp dụng class của day-component, đồng thời so sánh với hành vi của textfield. Hoàn tất khi lỗi tùy chỉnh hiển thị trong cả hai luồng mà không cần workaround.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
371
Fork
309
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của formio/react

Tất cả issue của formio/react

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.