Skip to content
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: Accept French Postal Services identifiers in forms #505

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Chatewgne
Copy link

@Chatewgne Chatewgne commented Mar 27, 2024

This PR is intended to fix the following issue : #504

The form validation in FRSIRENENumberMixin is missing a special case from the SIRENE register.

The identifiers for Postal Services need a special validation process and are not currently validated.

Source (in french) : https://www.sirene.fr/static-resources/doc/lettres/lettre-16-novembre-2013.pdf

All Changes

  • Add an entry to the docs/changelog.rst describing the change.

  • Add an entry for your name in the docs/authors.rst file if it's not
    already there.

@Chatewgne Chatewgne force-pushed the accept_french_postal_services_identifiers branch 2 times, most recently from 451a775 to 4632104 Compare March 29, 2024 09:29
@claudep
Copy link
Member

claudep commented Apr 11, 2024

Sorry for the delay for reviewing, could you please add/complement a test for this?

@Chatewgne Chatewgne force-pushed the accept_french_postal_services_identifiers branch from 4632104 to 1baf78b Compare April 22, 2024 08:29
@Chatewgne
Copy link
Author

Thanks for getting back to me @claudep, I have added the test cases :)

@benkonrath
Copy link
Member

The exception only applies to SIRET, not to SIREN, so this update isn't correct. I think we should remove the mixin and use stdnum to validate both of the fields directly in the form class. This would add few lines of common code to both classes but it makes things clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants