1HTML::FormFu::ConstrainUts:e:rCaClolnbtarcikbOuntceedH(T3PM)eLr:l:FDoorcmuFmue:n:tCaotnisotnraint::CallbackOnce(3)
2
3
4
6 HTML::FormFu::Constraint::CallbackOnce - Code Callback Constraint
7
9 version 2.07
10
12 $form->constraint({
13 type => 'CallbackOnce',
14 name => 'foo',
15 callback => \&sfoo,
16 );
17
18 sub foo {
19 my ( $value, $params ) = @_;
20
21 # return true or false
22 }
23
25 Unlinke the HTML::FormFu::Constraint::Callback, this callback is only
26 called once, regardless of how many values are submitted.
27
28 The first argument passed to the callback is the submitted value for
29 the associated field; this may be a single value or an arrayref of
30 value. The second argument passed to the callback is a hashref of
31 name/value pairs for all input fields.
32
33 This constraint doesn't honour the "not()" value.
34
36 callback
37 Arguments: \&sub_ref
38
40 Is a sub-class of, and inherits methods from HTML::FormFu::Constraint
41
42 HTML::FormFu
43
45 Carl Franks "cfranks@cpan.org"
46
48 This library is free software, you can redistribute it and/or modify it
49 under the same terms as Perl itself.
50
52 Carl Franks <cpan@fireartist.com>
53
55 This software is copyright (c) 2018 by Carl Franks.
56
57 This is free software; you can redistribute it and/or modify it under
58 the same terms as the Perl 5 programming language system itself.
59
60
61
62perl v5.32.0 2020H-T0M7L-:2:8FormFu::Constraint::CallbackOnce(3)