A server-side validation error removes the field's own validators (e.g. required)
Maintainer thường phản hồi trong vòng 3 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Describe the bug
When the REST API reports a validation error for a form field, FormService.addErrorToField() keeps the error in place with setValidators(), which replaces all validators of the field. removeErrorFromField() then calls clearValidators(). From then on the field has lost its own validators, such as required, so the client no longer flags it.
Seen on DSpace10.0; the same code is on main.
To Reproduce
- Start a new submission and leave a required field (e.g. Title) empty.
- Click "Deposit": the server-side error is shown on the field.
- Enter a value: the error goes away.
- Clear the field again: no "required" error is shown on the client any more.
Expected behavior
After a server-side error has been removed, the field still has its own validators, and clearing a required field shows the "required" error again.
Related work
Link to any related tickets or PRs here.
- Ngôn ngữ chính
- TypeScript
- Star
- 180
- Fork
- 577
- Merge trung bình
- 3 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 133
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DSpace/dspace-angular
-
Visual issues with qualdrop fieldsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởaffects: 10.x affects: 9.x bug component: submission Difficulty: Low help wanted ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
DSpace/dspace-angular#6412 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
accessibility affects: 10.x affects: 8.x affects: 9.x bug help wanted ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
DSpace/dspace-angular#6364 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Author browse links on item page open in a new tab, unlike other browse linksCó thể đã có người làm @jesielviana đã nhận 20 ngày trước. Đang mởaffects: main bug component: Item low priority
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
DSpace/dspace-angular#6268 · 4 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Mathjax single dollar sign delimiter configuration causes unintentional math rendering in abstractsĐang mởbug needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
DSpace/dspace-angular#6263 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
UI spacing regression on ds-generic-item-page-field (extra spaces around metadata values) in v10.xĐang mởaffects: 10.x affects: main bug component: Item ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
DSpace/dspace-angular#6254 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của DSpace/dspace-angular
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
marmelab/react-admin#11431 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
db-ux-design-system/core-web#8655 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
stripe/react-stripe-js#728 ·
-
[Upload Grade C dataset] the pop-up changes it's size while uploading the document => Jumping effectĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
epam/statgpt-admin-frontend#305 ·
Maintainer thường phản hồi trong vòng 1 ngày