GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  INPUT::VALIDATOR::CONDITION (3)

.ds Aq ’

NAME

Input::Validator::Condition - Condition object

CONTENTS

SYNOPSIS



    $validator->when(document)->regexp(qr/^1$/)
      ->then(sub { shift->field(number)->required(1) });



DESCRIPTION

Condition object.

ATTRIBUTES

CWthen



    $condition->then(sub { ... });



Holds callback that is called when conditions is matched.

METHODS

CWconstraint



    $condition->consraint(length => [1, 3]);



Adds a constraint.

CWlength

Shortcut



    $condition->consraint(length => @_);



CWmatch



    my $matched = $condition->match;



Check whether conditions is matched.

CWregexp

Shortcut



    $condition->consraint(regexp => @_);



CWwhen



    $condition->when(foo);
    $condition->when(qw/foo bar/);
    $condition->when([qw/foo bar baz/]);



Adds fields which values are checked to match the condition.

SEE ALSO

Input::Validator, Input::Validator::Field, Input::Validator::Constraint
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 INPUT::VALIDATOR::CONDITION (3) 2011-05-05

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.