equal
deleted
inserted
replaced
1 """ |
1 """ |
2 FI-specific Form helpers |
2 FI-specific Form helpers |
3 """ |
3 """ |
4 |
4 |
5 import re |
5 import re |
|
6 from django.core.validators import EMPTY_VALUES |
6 from django.forms import ValidationError |
7 from django.forms import ValidationError |
7 from django.forms.fields import Field, RegexField, Select, EMPTY_VALUES |
8 from django.forms.fields import Field, RegexField, Select |
8 from django.utils.translation import ugettext_lazy as _ |
9 from django.utils.translation import ugettext_lazy as _ |
9 |
10 |
10 class FIZipCodeField(RegexField): |
11 class FIZipCodeField(RegexField): |
11 default_error_messages = { |
12 default_error_messages = { |
12 'invalid': _('Enter a zip code in the format XXXXX.'), |
13 'invalid': _('Enter a zip code in the format XXXXX.'), |