angular / angular/components

(feat) Chips: validation for chips

Abierto
#8,801 9 comentarios 24 reacciones 0 asignados Ver en GitHub
area: material/chips feature forms G P2
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

#### 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?

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la reproducción vinculada de Plunker o StackBlitz y sigue la mat-chip-list dentro de mat-form-field, incluyendo la input anidada y el binding del formulario. Se considera terminado cuando los validadores personalizados y mat-error funcionan tanto para la entrada de chips como para toda la chip-list, con las adiciones reflejadas mediante ngModel y la API de validación.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
frontend
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.