1HTML::FormFu::ConstrainUts:e:rCaClolnbtarcikb(u3t)ed PerHlTMDLo:c:uFmoernmtFaut:i:oCnonstraint::Callback(3)
2
3
4

NAME

6       HTML::FormFu::Constraint::Callback - Code Callback Constraint
7

SYNOPSIS

9           $field->constraint({
10               type => 'Callback',
11               callback => \&foo,
12           });
13
14           ---
15           elements:
16             - type: Text
17               name: foo
18               constraints:
19                 - type: Callback
20                   callback: "main::my_constraint"
21
22           sub foo {
23               my ( $value, $params ) = @_;
24
25               # return true or false
26           }
27

DESCRIPTION

29       The first argument passed to the callback is the submitted value for
30       the associated field. The second argument passed to the callback is a
31       hashref of name/value pairs for all input fields.
32
33       This constraint doesn't honour the "not()" value.
34

METHODS

36   callback
37       Arguments: \&code-reference
38
39       Arguments: "subroutine-name"
40

SEE ALSO

42       Is a sub-class of, and inherits methods from HTML::FormFu::Constraint
43
44       HTML::FormFu
45

AUTHOR

47       Carl Franks "cfranks@cpan.org"
48

LICENSE

50       This library is free software, you can redistribute it and/or modify it
51       under the same terms as Perl itself.
52
53
54
55perl v5.12.1                      2010-05-H1T6ML::FormFu::Constraint::Callback(3)
Impressum