angular / angular/components

MatStepper navigation tiggers form validation when it's not touched

Aperta
#14,026 7 commenti 12 reazioni 0 assegnatari Vedi su GitHub
area: cdk/stepper feature P3
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

#### Bug, feature request, or proposal:
Bug

#### What is the expected behavior?
Form validation is triggered only if fields are touched.

#### What is the current behavior?
When navigating though a material stepper, the form validation is triggered even if the fields are not touched.

#### What are the steps to reproduce?
https://stackblitz.com/angular/nanlqdlandy
1. Submit first step, you will arrive to step 2
2. Go back to step 1
3. Go back to step 2

#### What is the use-case or motivation for changing an existing behavior?
I think it's pretty confusing for the user to show an error even if he/she didn't even start to touch the field.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
See stackblitz.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con la riproduzione StackBlitz collegata e segui la sequenza di navigazione di MatStepper: invia il passaggio 1, torna ad esso, quindi naviga nuovamente al passaggio 2. Confronta il comportamento di convalida dei campi non toccati con il comportamento previsto e considera completata la issue quando la navigazione non visualizza errori di convalida per i campi che rimangono non toccati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.