barrycarlyon has asked for the wisdom of the Perl Monks concerning the following question:
hey fellow pilgrims of the perl monks monastary
Is there a way to use check rm to see if the entries match an existing entry in a database?
Follows is my current checck rm routine:
my ($results, $err_page) = $self->check_rm('register', { required => [qw/username password password_check email email_check real_name year month date sex agree /], dependency_groups => {password_group => [qw/password password_chec +k/], email_group => [qw/email email_check/], }, constraints => { username => qr/^[a-z]\w{5,15}$/i, password => [ { constraint => qr/^\w{6,20}$/ }, { name => 'password_mismatch', constraint => sub { my ($password, $password_check) = @_; return ($password eq $password_check); }, params => [qw(password password_check)] } ], email => [ { constraint => 'email' }, { name => 'email_mismatch', constraint => sub { my ($email, $email_check) = @_; return ($email eq $email_check); }, params => [qw(email email_check)] } ], year => qr/^[1][0-9][0-9][0-9]$/, month => qr/^[A-Z]\w{2,10}$/i, date => qr/^[0-9][0-9]$/, }, filters => ['trim'], msgs => { missing => 'required +', invalid => 'invalid' +, constraints => { 'password_mismatch' => "Passwords don't match", 'email_mismatch' => "Email Addresses don't match", } } }); return $err_page if $err_page;
So basically i want to read in the values compare them to the database, and if any of the entire exist return the error page, whilst maintaining the inputted values, the values that id like to check is, the username, email, real_name
The form can be found here and the entire routine(perl module) Here
Yours
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: A validate rm, question
by shmem (Chancellor) on Jun 25, 2006 at 20:42 UTC |