(feat) Chips: validation for chips
- Ngôn ngữ chính
- TypeScript
- Star
- 25k
- Fork
- 6.8k
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 91
Mô tả
#### Bug, feature request, or proposal: feature
#### What is the expected behavior?
Custom validators and `mat-error` should work when placing a chip-list inside a mat-form-field
There should be a two-fold validation: if there is a nested input for adding new chips, the input should validate entry previous to adding it.
The data of the whole chip-list should be validated.
It should work seamlessly with ngModel and validation api.
#### What is the current behavior?
The nested input cant be validated.
The form-field is bound to the chip-list control state, but the chip-list's `value` doesn't hold the whole array, but just the selected item.
It doesn't react to addition/insertions, so no validation can be trigger/shown
#### What are the steps to reproduce?
Providing a StackBlitz/Plunker (or similar) is the *best* way to get the team to see your issue.
Plunker starter (using on `@master`): https://goo.gl/uDmqyY
StackBlitz starter (using latest `npm` release): https://goo.gl/wwnhMV
#### What is the use-case or motivation for changing an existing behavior?
Use the chip-list control to edit array data in a form, and properly validate the input
#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
#### Is there anything else we should know?
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với bản tái hiện Plunker hoặc StackBlitz được liên kết và lần theo mat-chip-list bên trong mat-form-field, bao gồm input lồng nhau và liên kết biểu mẫu. Hoàn tất khi các trình xác thực tùy chỉnh và mat-error hoạt động cho cả việc nhập chip và toàn bộ chip-list, với các phần tử được thêm vào được phản ánh thông qua ngModel và API xác thực.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, typescript
- Lĩnh vực
- frontend
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100