diff options
author | ivan <ivan> | 2004-04-30 21:58:15 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-04-30 21:58:15 +0000 |
commit | 7404fa4a193912074a9e63f9db891abf2b399b78 (patch) | |
tree | b8c4818968338300b3714087ac7b217388def002 /FS | |
parent | d36f8467522fc1cf91775dfeffc15308f2c3034b (diff) |
accept empty zips for non-US countries...
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Record.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index 801b89daf..dd87e5a9a 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -1307,9 +1307,13 @@ sub ut_zip { $self->getfield($field); $self->setfield($field,$1); } else { - $self->getfield($field) =~ /^\s*(\w[\w\-\s]{2,8}\w)\s*$/ - or return gettext('illegal_zip'). " $field: ". $self->getfield($field); - $self->setfield($field,$1); + if ( $self->getfield($field) =~ /^\s*$/ ) { + $self->setfield($field,''); + } else { + $self->getfield($field) =~ /^\s*(\w[\w\-\s]{2,8}\w)\s*$/ + or return gettext('illegal_zip'). " $field: ". $self->getfield($field); + $self->setfield($field,$1); + } } ''; } |