diff --git a/django/contrib/localflavor/il/forms.py b/django/contrib/localflavor/il/forms.py
index bbf95d2..a143587 100644
a
|
b
|
Israeli-specific form helpers
|
4 | 4 | import re |
5 | 5 | |
6 | 6 | from django.core.exceptions import ValidationError |
| 7 | from django.core.validators import EMPTY_VALUES |
7 | 8 | from django.forms.fields import RegexField, Field, EMPTY_VALUES |
8 | 9 | from django.utils.checksums import luhn |
9 | 10 | from django.utils.translation import ugettext_lazy as _ |
… |
… |
class ILPostalCodeField(RegexField):
|
34 | 35 | super(ILPostalCodeField, self).__init__(r'^\d{5}$', *args, **kwargs) |
35 | 36 | |
36 | 37 | def clean(self, value): |
37 | | if value is not None: |
| 38 | if value not in EMPTY_VALUES: |
38 | 39 | value = value.replace(" ", "") |
39 | 40 | return super(ILPostalCodeField, self).clean(value) |
40 | 41 | |