-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix: enhance agents errors messages #725
Fix: enhance agents errors messages #725
Conversation
a89c407
to
de9192d
Compare
Attention le comportement osit unifié avec https://github.com/ontoportal-lirmm/bioportal_web_ui/blob/master/app/controllers/users_controller.rb#L261 Philosophie générale: on pre-traite un peu la données a envoyer au back ... mais les vrais validateurs sont dans le back (ou pas dans ce cas la)/. |
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.
@syphax-bouazzouni ready for your review
84de17f
to
29e12bb
Compare
* accept different orcid forms in agents creation/update form * humanize empty values errors in creating and updating agents * accept ror identifier in all forms and handle it in the UI * humanize identifier already used when updating agent * put agent form errors in local lang files * extract generate agents errors function * remove ror/orcid ui validators * enhance invalid agents identifiers url error message
related issue:
agroportal/project-management#577
related back PR:
ontoportal-lirmm/ontologies_linked_data#152
Changes:
Humanization of the agents form errors (errors handled: nil/empty required values errors, unique identifiers errors).
Accept all forms of ORCIDs (16 digits, ORCID URL with or without "www." and with or without scheme http/https) then in all cases we pass it in this form to the back: 1234-1234-1234-1234
Accept all forms of RORs (9 characters, Full URL with 'https://ror.org/' with or without scheme http/https) then in all cases we pass it in this form to the back: 02mn0vt57
If the orcid is not valid, we pass the value invalid_orcid and the back generates an error
if the ror is not valid, we pass the value invalid_ror and the back generates an error
Demos:
Enregistrement.de.l.ecran.2024-08-01.a.16.32.16.mov
Enregistrement.de.l.ecran.2024-08-01.a.16.28.00.mov