-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Candidature : vérifier la cohérence du NIR avec la date de naissance et la civilité #4746
Conversation
638e4f8
to
b4dfdf1
Compare
b4dfdf1
to
3629e7c
Compare
"Une incohérence a été détectée parmi les informations suivantes : " | ||
"la civilité, le numéro de sécurité sociale et la date de naissance. " | ||
"Veuillez corriger celle(s) en erreur pour continuer." | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je verrais bien des erreurs plus spécifique plutôt que de laisser l'utilisateur essayer de deviner.
Peut-être en mettant d'ailleurs l'erreur sur le champs fautif via un self.add_error("birthdate", ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Des erreurs plus spécifiques d'accord, mais vu que ça concerne des paires de champs, on ne sait pas vraiment quel champ est fautif.
Certes, on a la vérification du NIR avec sa clé normalement, mais d'un point de vue UX je ne sais pas ce qui est le mieux. Je vais demander à Marion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai eu le retour de Marion. Elle propose ces messages (pas la peine d'expliquer la structure du NIR, trop complexe).
J'ai utilisé l'opérateur %
pour inclure le NIR dans le message d'erreur quand il y a besoin, mais je ne suis pas sûr que ce soit une bonne pratique.
8eb1d86
to
19723dd
Compare
3bfe425
to
0b2e7ec
Compare
2d17540
to
52f3bfb
Compare
"Une erreur a été détectée. " | ||
"La date de naissance renseignée ne correspond pas au numéro de sécurité " | ||
"sociale 178122978200508 enregistré." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai écrit le message d'erreur en dur pour être sûr le NIR soit bien inclus.
- added a static method in JobSeekerProfile - used that static method in forms (CheckJobSeekerInfoForm, CreateOrUpdateJobSeekerStep1Form, EditJobSeekerInfoForm) tests: - updated the JobSeekerProfileFactory in order to generate a consistent NIR (depding on title and bdate) - updated some tests (mainly setting fixed NIRs and bdates in test objects) - added test cases in ApplyAs*
52f3bfb
to
0f8e9cb
Compare
🤔 Pourquoi ?
Une nouvelle vérification pour être sûr que les données entrées soient cohérentes.