1Validation::Class::DireUcsteirveC:o:nDtartieb(u3t)ed PerVlalDiodcautmieonnt:a:tCiloanss::Directive::Date(3)
2
3
4

NAME

6       Validation::Class::Directive::Date - Date Directive for Validation
7       Class Field Definitions
8

VERSION

10       version 7.900057
11

SYNOPSIS

13           use Validation::Class::Simple;
14
15           my $rules = Validation::Class::Simple->new(
16               fields => {
17                   creation_date  => {
18                       date => 1
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

DESCRIPTION

32       Validation::Class::Directive::Date is a core validation class field
33       directive that provides validation of simple date formats.
34
35       ·       alternative argument: an-array-of-options
36
37       ·       option: dmy e.g. 27-12-2006 or 27-12-06
38
39       ·       option: mdy e.g. 12-27-2006 or 12-27-06
40
41       ·       option: ymd e.g. 2006-12-27 or 06-12-27
42
43       ·       option: dMy e.g. 27 December 2006 or 27 Dec 2006
44
45       ·       option: Mdy e.g. December 27, 2006 or Dec 27, 2006 (comma
46               optional)
47
48       ·       option: My e.g. December 2006 or Dec 2006
49
50       ·       option: my e.g. 12/2006
51
52               This directive can be passed a single value or an array of
53               values:
54
55                   fields => {
56                       creation_date  => {
57                           date => ['dmy', 'mdy']
58                       }
59                   }
60

AUTHOR

62       Al Newkirk <anewkirk@ana.io>
63
65       This software is copyright (c) 2011 by Al Newkirk.
66
67       This is free software; you can redistribute it and/or modify it under
68       the same terms as the Perl 5 programming language system itself.
69
70
71
72perl v5.32.0                      2020-07-V2a8lidation::Class::Directive::Date(3)
Impressum