Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

A server-side validation error removes the field's own validators (e.g. required)

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

Maintainer thường phản hồi trong vòng 3 ngày

@kanasznagyzoltan đang làm issue này rồi.

Từ ngày 7/10/2026.

  • #6337 của @kanasznagyzoltan — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

affects: 10.x affects: main bug component: submission error handling

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

  1. Start a new submission and leave a required field (e.g. Title) empty.
  2. Click "Deposit": the server-side error is shown on the field.
  3. Enter a value: the error goes away.
  4. 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

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 DSpace/dspace-angular

Tất cả issue của DSpace/dspace-angular

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.