You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl-cvs@perl.apache.org by ri...@apache.org on 2002/11/20 08:00:18 UTC
cvs commit: embperl/eg/web/db login.epl loginform.epl
richter 2002/11/19 23:00:18
Added: Embperl/Form/Validate Integer.pm Select.pm
eg/web/db login.epl loginform.epl
Log:
move 2.0 to HEAD
Revision Changes Path
1.1 embperl/Embperl/Form/Validate/Integer.pm
Index: Integer.pm
===================================================================
###################################################################################
#
# Embperl - Copyright (c) 1997-2002 Gerald Richter / ecos gmbh www.ecos.de
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.
#
# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# $Id: Integer.pm,v 1.1 2002/11/20 07:00:18 richter Exp $
#
###################################################################################
package Embperl::Form::Validate::Integer ;
use base qw(Embperl::Form::Validate::Number);
# --------------------------------------------------------------
sub validate
{
my ($self, $key, $value, $fdat, $pref) = @_ ;
return $value =~ /^\s*[0-9+-][0-9]*\s*$/ ? undef : ['validate_number', $value] ;
}
1;
1.1 embperl/Embperl/Form/Validate/Select.pm
Index: Select.pm
===================================================================
###################################################################################
#
# Embperl - Copyright (c) 1997-2002 Gerald Richter / ecos gmbh www.ecos.de
#
# You may distribute under the terms of either the GNU General Public
# License or the Artistic License, as specified in the Perl README file.
#
# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# $Id: Select.pm,v 1.1 2002/11/20 07:00:18 richter Exp $
#
###################################################################################
package Embperl::Form::Validate::Select ;
use base qw(Embperl::Form::Validate::Default);
# --------------------------------------------------------------
sub getscript_required
{
my ($self, $arg, $pref) = @_ ;
return ('obj.selectedIndex != 0', ['validate_required']) ;
}
1;
1.2 +14 -0 embperl/eg/web/db/login.epl
1.2 +85 -0 embperl/eg/web/db/loginform.epl
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-cvs-help@perl.apache.org