CodeYourFuture / CodeYourFuture/React-Module-Project
Feature Validate AddBooking
- Langage dominant
- JavaScript
- Étoiles
- 1
- Forks
- 28
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Depends on #24
**Instructions:**
Add validation to some fields from #24 : the first name and last name must not be empty, the email must contain exactly 1 `@` symbol, and at least one `.` symbol after the `@`; the room ID must be a number between 0 and 100. If the fields do not contain correct information when the 'Submit' button is pressed, display a red error message at the top of the page, but do not clear the text already in the field.
**Test:**
An invalid input displays an error message after the 'Submit' button is pressed (e.g. an email like `react@com` is invalid). A valid input shows the correct values at the bottom of the page.
**Reflection:**
Validating user input is an important part of any application. Without checking the input, you might see unexpected errors when working with the data later.
What do you think would happen if you were asked to remove a booking for room number '81', but the user had typed 'eightyOne' or 'EIGHTY ONE'?
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par localiser le formulaire AddBooking introduit par issue #24 et exécutez l’application pour tester son flux de Submit. Ajoutez une validation pour les champs nommés tout en conservant le texte saisi, affichez une erreur en rouge en haut pour les entrées invalides et vérifiez que les valeurs valides apparaissent en bas comme décrit dans le test.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, react
- Domaine
- frontend, web-dev
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100