Fixed issue with postcode validator
This commit is contained in:
parent
aed22d1c98
commit
ae6884202a
2 changed files with 5 additions and 2 deletions
|
@ -32,7 +32,7 @@ sub register {
|
|||
try {
|
||||
$postcode = Geo::UK::Postcode->new( $value );
|
||||
};
|
||||
return defined $postcode && $postcode->valid ? undef : 1;
|
||||
return defined( $postcode ) && ( $postcode->valid ) && ! ( $postcode->partial ) ? undef : 1;
|
||||
|
||||
});
|
||||
|
||||
|
|
Reference in a new issue