Compare commits
1 commit
developmen
...
ben/fix/fa
Author | SHA1 | Date | |
---|---|---|---|
fc9cfe6cd4 |
2 changed files with 3 additions and 3 deletions
|
@ -34,7 +34,7 @@ sub post_feedback {
|
||||||
my $user_rs = $c->schema->resultset('User');
|
my $user_rs = $c->schema->resultset('User');
|
||||||
|
|
||||||
$validation->required('email')->in_resultset( 'email', $user_rs );
|
$validation->required('email')->in_resultset( 'email', $user_rs );
|
||||||
$validation->required('feedbacktext');
|
$validation->required('feedbacktext', 'not_empty');
|
||||||
$validation->required('app_name');
|
$validation->required('app_name');
|
||||||
$validation->required('package_name');
|
$validation->required('package_name');
|
||||||
$validation->required('version_code');
|
$validation->required('version_code');
|
||||||
|
|
|
@ -69,8 +69,8 @@ sub post_register {
|
||||||
my $usertype = $validation->param('usertype') || '';
|
my $usertype = $validation->param('usertype') || '';
|
||||||
|
|
||||||
if ( $usertype eq 'customer' ) {
|
if ( $usertype eq 'customer' ) {
|
||||||
$validation->required('display_name');
|
$validation->required('display_name', 'not_empty');
|
||||||
$validation->required('full_name');
|
$validation->required('full_name', 'not_empty');
|
||||||
my $year = DateTime->now->year;
|
my $year = DateTime->now->year;
|
||||||
$validation->required('year_of_birth')->number->gt_num($year - 150)->lt_num($year - 10);
|
$validation->required('year_of_birth')->number->gt_num($year - 150)->lt_num($year - 10);
|
||||||
} elsif ( $usertype eq 'organisation' ) {
|
} elsif ( $usertype eq 'organisation' ) {
|
||||||
|
|
Reference in a new issue