1Validation::Class::DireUcsteirveC:o:nLternigbtuht(e3d)PVearllidDaotciuomne:n:tCaltaisosn::Directive::Length(3)
2
3
4
6 Validation::Class::Directive::Length - Length Directive for Validation
7 Class Field Definitions
8
10 version 7.900057
11
13 use Validation::Class::Simple;
14
15 my $rules = Validation::Class::Simple->new(
16 fields => {
17 security_pin => {
18 length => 4
19 }
20 }
21 );
22
23 # set parameters to be validated
24 $rules->params->add($parameters);
25
26 # validate
27 unless ($rules->validate) {
28 # handle the failures
29 }
30
32 Validation::Class::Directive::Length is a core validation class field
33 directive that validates the exact length of the associated parameters.
34
36 Al Newkirk <anewkirk@ana.io>
37
39 This software is copyright (c) 2011 by Al Newkirk.
40
41 This is free software; you can redistribute it and/or modify it under
42 the same terms as the Perl 5 programming language system itself.
43
44
45
46perl v5.28.1 2015-1V0a-l2i1dation::Class::Directive::Length(3)