Bulgaria (bg)

Validators

localflavor.bg.validators.egn_validator(egn)[source]

Check Bulgarian unique citizenship number (EGN) for validity More details https://en.wikipedia.org/wiki/Unique_citizenship_number Full information in Bulgarian about algorithm is available here http://www.grao.bg/esgraon.html#section2

localflavor.bg.validators.eik_validator(eik)[source]

Check Bulgarian EIK/BULSTAT codes for validity full information in Bulgarian about algorithm is available here http://bulstat.registryagency.bg/About.html

Model Fields

class localflavor.bg.models.BGEGNField(*args, **kwargs)[source]

Field that stores Bulgarian unique citizenship number (EGN)

This is shortcut for:

models.CharField(max_length=10, validators=[localflavor.bg.validators.egn_validator])
class localflavor.bg.models.BGEIKField(*args, **kwargs)[source]

Field that stores Bulgarian EIK/BULSTAT codes

This is shortcut for:

models.CharField(max_length=13, validators=[localflavor.bg.validators.eik_validator])

Utils

localflavor.bg.utils.get_egn_birth_date(egn)[source]

Extract birth date from Bulgarian unique citizenship number (EGN) More details https://en.wikipedia.org/wiki/Unique_citizenship_number Information in Bulgarian for this can be found here http://www.grao.bg/esgraon.html#section2