Name

MV_VALID_STATE — (partly documented)

SYNOPSIS

{ }

DESCRIPTION

Allows you to supply an alternate string to override the standard State validation.

VARIABLE TYPE

Catalog variable

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

MV_VALID_STATE is available in Interchange versions:

4.6.0-5.7.0 (git-head)

SOURCE

Interchange 5.7.0:

Source: lib/Vend/Order.pm
Line 1165 (context shows lines 1155-1169 in _state_province():1155)

sub _state_province {
my($ref,$var,$val) = @_;
my $error;
if(length($val) != 2) {
$error = 1;
}
else {
my $pval  = $::Variable->{MV_VALID_PROVINCE}
  ? " $::Variable->{MV_VALID_PROVINCE} "
  : $state_template{CA};
my $sval  = $::Variable->{MV_VALID_STATE}
  ? " $::Variable->{MV_VALID_STATE} "
    : $state_template{US};
$error = 1
  unless  $sval =~ /\s$val\s/i or $pval =~ /\s$val\s/i ;

Source: lib/Vend/Order.pm
Line 1181 (context shows lines 1171-1185 in _state():1179)

if($error) {
  return (undef, $var,
    errmsg( "'%s' not a two-letter state or province code", $val )
  );
}
return (1, $var, '');
}

sub _state {
my($ref,$var,$val) = @_;
my $sval  = $::Variable->{MV_VALID_STATE}
      ? " $::Variable->{MV_VALID_STATE} "
      : $state_template{US};

if( $val =~ /\S/ and $sval =~ /\s$val\s/i ) {

AUTHORS

Interchange Development Group

SEE ALSO

DocBook! Interchange!