"Codice Fiscale" field should be unique as it represent the unique ID of a person in Italy
There are two main problems:
CF are not always unique, this was solved by using omocodes but is common online for users to avoid using his personal omocode and instead using the not omocode CF to avoid problem with too much simpler validation
A lot of people insert wrong CF because of typos, memory, laziness (see #50 for possible solutions)
For foreign person (mainly immigrants) is common to use not so clean data when registering in Italy...so a lot of omocodes and strange CF
No good database of province is available, python-codicefiscale has a good solution but in general is a best effort
Solution
[x] Set Member.cf as unique=False (to permit foreign and strange CF to pass)
[x] Add field `Member.skip_cf_valid = models.BooleanField(default=False)
[x] Add validator in Member to check if Member.cf is valid (see #50 )
[x] Add validator in Member to check if Member.cf is unique unless Member.skip_cf_valid=True
Description
"Codice Fiscale" field should be unique as it represent the unique ID of a person in Italy There are two main problems:
python-codicefiscale
has a good solution but in general is a best effortSolution
Add field `Member.skip_cf_valid = models.BooleanField(default=False)Member
to check ifMember.cf
is valid (see #50 )Add validator inMember
to check ifMember.cf
is unique unlessMember.skip_cf_valid=True