1Validation::Class::DireUcsteirveC:o:nAtlriiabsu(t3e)d PeVralliDdoactuimoenn:t:aCtliaosns::Directive::Alias(3)
2
3
4
6 Validation::Class::Directive::Alias - Alias 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 login => {
18 alias => 'username'
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::Alias is a core validation class field
33 directive that provides the ability to map arbitrary parameter names
34 with a field's parameter value.
35
36 ยท alternative argument: an-array-of-aliases
37
38 This directive can be passed a single value or an array of
39 values:
40
41 fields => {
42 login => {
43 alias => ['username', 'email_address']
44 }
45 }
46
48 Al Newkirk <anewkirk@ana.io>
49
51 This software is copyright (c) 2011 by Al Newkirk.
52
53 This is free software; you can redistribute it and/or modify it under
54 the same terms as the Perl 5 programming language system itself.
55
56
57
58perl v5.28.0 2015-10V-a2l1idation::Class::Directive::Alias(3)