Final minor pass of a full registration form on the website
This commit is contained in:
parent
704f429fa5
commit
1bb483bb5a
4 changed files with 108 additions and 20 deletions
|
@ -17,6 +17,11 @@ sub register {
|
|||
return $rs->search({ $key => $value })->count ? undef : 1;
|
||||
});
|
||||
|
||||
$app->validator->add_check( not_in_resultset => sub {
|
||||
my ( $validation, $name, $value, $key, $rs ) = @_;
|
||||
return $rs->search({ $key => $value })->count ? 1 : undef;
|
||||
});
|
||||
|
||||
$app->validator->add_check( postcode => sub {
|
||||
my ( $validation, $name, $value ) = @_;
|
||||
return Geo::UK::Postcode->new( $value )->valid ? undef : 1;
|
||||
|
|
Reference in a new issue