Name

match — CGI value matches another CGI value

DESCRIPTION

Verification of the form field value succeeds if the passed value matches that of another specified CGI variable.

EXAMPLES

Example: Match mv_password and mv_verify

mv_verify=match mv_password "The passwords must match"

NOTES

AVAILABILITY

match is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: code/OrderCheck/match.oc
Lines: 24


# Copyright 2007 Interchange Development Group (http://www.icdevgroup.org/)
# Licensed under the GNU GPL v2. See file LICENSE for details.
# $Id: match.oc,v 1.1 2007-05-04 14:36:00 mheins Exp $

CodeDef match OrderCheck 1
CodeDef match Description Matches another CGI variable, possibly for password verify
CodeDef match Routine <<EOR
sub {
my($ref, $name, $value, $msg) = @_;
$msg =~ s/^\s*(\w[-\w]*)\s*//
  or return undef;
my $other = $1;

if($ref->{$other} ne $value) {
  $msg = errmsg(
          "%s doesn't match %s.",
          $name,
          $other,
          ) if ! $msg;
  return(0, $name, $msg);
}
return (1, $name, '');
}
EOR

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!