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

Issue 1779/personnummer validation #1812

Closed
wants to merge 2 commits into from

Conversation

alexandrakoch
Copy link
Collaborator

Description

This PR adds personnummer validation to predictProblems.ts, using the verifiera library.

Changes

  • Adds verifieradependency
  • Changes predictProblems.ts to accept Swedish format 'personnummer'

Related issues

Resolves #1779

@alexandrakoch
Copy link
Collaborator Author

The current code throws an error when importing to the DB, it could be that it needs to be in date format? The library I'm using has functions for getting dates from the personnummer, but it's not code I'm familiar with so if someone wants to do those changes or help guide me, feel free!

@alexandrakoch
Copy link
Collaborator Author

This is my test data:

Exempeldata Zetkin.csv

@ziggabyte
Copy link
Contributor

Long time since this was started on but I'm gonna take a look and see if I can work something out!

@richardolsson
Copy link
Member

This PR is superseded by #1981, in which we chose a slightly different route, creating a more generalized way of parsing dates during an import.

@richardolsson richardolsson deleted the issue-1779/personnummer-validation branch May 31, 2024 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Importer: Swedish "personnummer" is not translated as date
3 participants