version: 0.1.5
from stdnumfield.models import StdNumField
class SomeMode(models.Model):
field = StdNumField(
'hr.oib', # stdnum format
)
class SampleModelForm(ModelForm):
class Meta:
model = SomeModel
fields = ('field',)
error_messages = {
'field': {
'stdnum_format':_("Not maching format %(format_list)s"), # you can override exception message
},
}
See python-stdnum