1Workflow::Validator::MaUtscehresCDoantterFiobrumtaetdW(o3Pr)ekrflloDwo:c:uVmaelnitdaattioorn::MatchesDateFormat(3)
2
3
4

NAME

6       Workflow::Validator::MatchesDateFormat - Ensure a stringified date
7       matches a given pattern
8

SYNOPSIS

10        <action name="CreateNews">
11          <validator name="DateFormat">
12             <param name="date_format" value="%Y-%m-%d"/>
13             <arg value="$news_post_date"/>
14          </validator>
15        </action>
16

DESCRIPTION

18       This validator ensures that a given date string matches a "strptime"
19       pattern. The parameter 'date_format' is used to declare the pattern
20       against which the date string must be matched, and the single argument
21       is the date to match.
22
23       The 'date_format' pattern is a typical "strptime" pattern. See Date‐
24       Time::Format::Strptime for details.
25
26       NOTE: If you pass an empty string (or no string) to this validator it
27       will not throw an error. Why? If you want a value to be defined it is
28       more appropriate to use the 'is_required' attribute of the input field
29       to ensure it has a value.
30
31       Also, if you pass a DateTime object to the validator it will not deter‐
32       mine whether the date is correct or within a range. As far as it is
33       concerned its job is done.
34
35       METHODS
36
37       #=head3 _init
38
39       #=head3 validate
40
42       Copyright (c) 2003-2004 Chris Winters. All rights reserved.
43
44       This library is free software; you can redistribute it and/or modify it
45       under the same terms as Perl itself.
46

AUTHORS

48       Chris Winters <chris@cwinters.com>
49
50
51
52perl v5.8.8                       2007W-o0r4k-f2l5ow::Validator::MatchesDateFormat(3)
Impressum