Romania (ro)

Forms

Romanian specific form helpers.

class localflavor.ro.forms.ROCIFField(max_length=10, min_length=2, *args, **kwargs)[source]

A Romanian fiscal identity code (CIF) field

For CIF validation algorithm see http://www.validari.ro/cui.html

clean(value)[source]

CIF validation

class localflavor.ro.forms.ROCNPField(max_length=13, min_length=13, *args, **kwargs)[source]

A Romanian personal identity code (CNP) field

For CNP validation algorithm see http://www.validari.ro/cnp.html

clean(value)[source]

CNP validations

class localflavor.ro.forms.ROCountyField(required=True, widget=None, label=None, initial=None, help_text=None, error_messages=None, show_hidden_initial=False, validators=[], localize=False)[source]

A form field that validates its input is a Romanian county name or abbreviation. It normalizes the input to the standard vehicle registration abbreviation for the given county

WARNING: This field will only accept names written with diacritics; consider using ROCountySelect if this behavior is unnaceptable for you

Example:

Argeş => valid Arges => invalid
class localflavor.ro.forms.ROCountySelect(attrs=None)[source]

A Select widget that uses a list of Romanian counties (judete) as its choices.

class localflavor.ro.forms.ROIBANField(max_length=40, min_length=24, *args, **kwargs)[source]

Romanian International Bank Account Number (IBAN) field

For Romanian IBAN validation algorithm see http://validari.ro/iban.html

clean(value)[source]

Strips - and spaces, performs country code and checksum validation

class localflavor.ro.forms.ROPhoneNumberField(max_length=20, min_length=10, *args, **kwargs)[source]

Romanian phone number field

clean(value)[source]

Strips -, (, ) and spaces. Checks the final length.

class localflavor.ro.forms.ROPostalCodeField(max_length=6, min_length=6, *args, **kwargs)[source]

Romanian postal code field.

Data

localflavor.ro.ro_counties.COUNTIES_CHOICES = (('AB', 'Alba'), ('AR', 'Arad'), ('AG', 'Argeş'), ('BC', 'Bacău'), ('BH', 'Bihor'), ('BN', 'Bistriţa-Năsăud'), ('BT', 'Botoşani'), ('BV', 'Braşov'), ('BR', 'Brăila'), ('B', 'Bucureşti'), ('BZ', 'Buzău'), ('CS', 'Caraş-Severin'), ('CL', 'Călăraşi'), ('CJ', 'Cluj'), ('CT', 'Constanţa'), ('CV', 'Covasna'), ('DB', 'Dâmboviţa'), ('DJ', 'Dolj'), ('GL', 'Galaţi'), ('GR', 'Giurgiu'), ('GJ', 'Gorj'), ('HR', 'Harghita'), ('HD', 'Hunedoara'), ('IL', 'Ialomiţa'), ('IS', 'Iaşi'), ('IF', 'Ilfov'), ('MM', 'Maramureş'), ('MH', 'Mehedinţi'), ('MS', 'Mureş'), ('NT', 'Neamţ'), ('OT', 'Olt'), ('PH', 'Prahova'), ('SM', 'Satu Mare'), ('SJ', 'Sălaj'), ('SB', 'Sibiu'), ('SV', 'Suceava'), ('TR', 'Teleorman'), ('TM', 'Timiş'), ('TL', 'Tulcea'), ('VS', 'Vaslui'), ('VL', 'Vâlcea'), ('VN', 'Vrancea'))

A list of Romanian counties as choices in a formfield.

Table Of Contents

Previous topic

Paraguay (py)

Next topic

Russia (ru)

This Page