|
NAMEInput::Validator::Condition - Condition objectSYNOPSIS$validator->when('document')->regexp(qr/^1$/) ->then(sub { shift->field('number')->required(1) }); DESCRIPTIONCondition object.ATTRIBUTES"then"$condition->then(sub { ... }); Holds callback that is called when conditions is matched. METHODS"constraint"$condition->consraint(length => [1, 3]); Adds a constraint. "length"Shortcut$condition->consraint(length => @_); "match"my $matched = $condition->match; Check whether conditions is matched. "regexp"Shortcut$condition->consraint(regexp => @_); "when"$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 ALSOInput::Validator, Input::Validator::Field, Input::Validator::Constraint
Visit the GSP FreeBSD Man Page Interface. |