diff options
-rw-r--r-- | FS/FS/Record.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index c3d397389..92e0baadf 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -3062,6 +3062,13 @@ sub ut_zip { $self->getfield($field); $self->setfield($field, "$1 $2"); + } elsif ( $country eq 'AU' ) { + + $self->getfield($field) =~ /^\s*(\d{4})\s*$/ + or return gettext('illegal_zip'). " $field for country $country: ". + $self->getfield($field); + $self->setfield($field, $1); + } else { if ( $self->getfield($field) =~ /^\s*$/ |