Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/validators/i18n/fr.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def _ssn_pattern():
r"^([12])" # gender (1=M, 2=F)
r"\s(\d{2})" # year of birth
r"\s(0[1-9]|1[0-2])" # month of birth
r"\s(\d{2,3}|2[AB])" # department of birth
r"\s(\d{2}|97\d|2[AB])" # department of birth (only overseas ones have 3 digits)
r"\s(\d{2,3})" # town of birth
r"\s(\d{3})" # registration number
r"(?:\s(\d{2}))?$", # control key (may or may not be provided)
Expand Down
2 changes: 2 additions & 0 deletions tests/i18n/test_fr.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def test_returns_true_on_valid_ssn(value: str):
("1 84 12 00 451 089",), # invalid department
("1 84 12 2C 451 089",),
("1 84 12 98 451 089",), # invalid department
("1 84 12 075 76 481 95",), # zero-padded department
("1 84 12 001 23 481",),
# ("1 84 12 971 451 089",), # ?
],
)
Expand Down