diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-11-28 10:36:31 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-11-28 10:36:31 +0000 |
commit | a7e52d4c0bba92b62ddadd5d03cb760b41717986 (patch) | |
tree | 6c11dc27fa123b9b0a5f596b8b3130e9651c209a | |
parent | 55bf67210e46074cd0d31b92c7b9d6ffd8817945 (diff) |
Only have grid refs of at least 4 digits.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Location.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Location.pm b/perllib/FixMyStreet/App/Controller/Location.pm index 3e44cd748..e8bf2cd1c 100644 --- a/perllib/FixMyStreet/App/Controller/Location.pm +++ b/perllib/FixMyStreet/App/Controller/Location.pm @@ -69,7 +69,7 @@ sub determine_location_from_pc : Private { $c->stash->{longitude} = $2; return $c->forward( 'check_location' ); } - if ( $c->cobrand->country eq 'GB' && $pc =~ /^([A-Z])([A-Z])([\d\s]+)$/i ) { + if ( $c->cobrand->country eq 'GB' && $pc =~ /^([A-Z])([A-Z])([\d\s]{4,})$/i) { if (my $convert = gridref_to_latlon( $1, $2, $3 )) { $c->stash->{latitude} = $convert->{latitude}; $c->stash->{longitude} = $convert->{longitude}; |