perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin M. Harrison" <shado...@doublebagel.com>
Subject Form Validate Error
Date Tue, 13 Aug 2002 01:18:27 GMT
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


Mime
View raw message