MatStepper navigation tiggers form validation when it's not touched
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
#### 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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par la reproduction StackBlitz liée et suivez la séquence de navigation de MatStepper : validez l’étape 1, revenez-y, puis naviguez à nouveau vers l’étape 2. Comparez le comportement de validation des champs non touchés avec le comportement attendu, et considérez l’issue comme terminée lorsque la navigation n’affiche pas d’erreurs de validation pour les champs qui restent non touchés.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100