perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Harrison" <shado...@doublebagel.com>
Subject RE: Form Validate Error
Date Tue, 13 Aug 2002 01:20:33 GMT
(Regarding line:

$epf->validate_messages;

It is actually:

$errors = $epf -> validate_messages;

But I commented it out for testing. It doesn't seem to make much
difference if I use:

$errors = $epf -> validate_messages($fdat);

)

> -----Original Message-----
> From: Justin M. Harrison [mailto:shadowj4@doublebagel.com] 
> Sent: Monday, August 12, 2002 9:18 PM
> To: embperl@perl.apache.org
> Subject: Form Validate Error
> 
> 
> Hi,
> 
> I am attempting to validate a submitted form via code called 
> in an imported object perl module.
> 
> This is the error I am receiving:
> 
> ERR: 24: Error in Perl code: Can't locate object method 
> "validate_Username was not entered" via package 
> "Embperl::Form::Validate::Default" (perhaps you forgot to load
> "Embperl::Form::Validate::Default"?) at 
> /usr/lib/perl5/site_perl/i386-linux/Embperl/Form/Validate.pm line 317.
> 
> 
> ----------------------------------------------
> 
> The calling code:
> 
> 	use Embperl::Form::Validate;
> 	use rules;
> 	$epf = new Embperl::Form::Validate(&loginform,"login");
> 	print "Epf: $epf\n";
> 	$epf->validate_messages;
> 
> 
> ----------------------------------------------
> 
> Rules.pm:
> 
> sub loginform {
> return([
> 	[-key => 'username',
>   	-name => 'username'
>   	-msg => "Username was not entered",
>   	required=>1.
> 	-msg => "Username was too short",
> 	length_min=>1,
> 	-msg => "Username was too long",
> 	length_max=>15,
> 	],
> 	[-key => 'password',
> 	-name => 'password',
>   	-msg => "Password was not entered",
>   	required=>1.
> 	-msg => "Password was too short",
> 	length_min=>1,
> 	-msg => "Password was too long",
> 	length_max=>15,
> 	]
> ]);
> }
> 
> 1;
> 
> ----------------------------------------------
> 
> It appears to be receiving the rules and form fields in $fdat 
> fine. I am not sure what is causing this error.
> 
> Does anybody have any clues?
> 
> Thanks
> 
> Justin
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message