[svn-upgrade] Integrating new upstream version, libdata-formvalidator-perl (4.66)
Jonathan Yu
14 years ago
0 | ||
1 | 4.66 Wed Feb 24 09:30:17 EST 2010 | |
2 | ||
3 | [DOCUMENTATION] | |
4 | - Typo fixes (Jonathan Yu) | |
5 | ||
6 | [INTERNALS] | |
7 | - Test suite fix for 5.11.1 and newer. | |
8 | ||
0 | 9 | 4.65 Wed Dec 30 22:17:33 EST 2009 |
1 | 10 | |
2 | 11 | [NEW FEATURES] |
0 | 0 | Build.PL |
1 | 1 | Changes |
2 | MANIFEST This list of files | |
3 | MANIFEST.SKIP | |
4 | META.yml | |
5 | README | |
6 | RELEASE_NOTES | |
2 | 7 | lib/Data/FormValidator.pm |
3 | 8 | lib/Data/FormValidator/Constraints.pm |
4 | 9 | lib/Data/FormValidator/Constraints/Dates.pm |
6 | 11 | lib/Data/FormValidator/ConstraintsFactory.pm |
7 | 12 | lib/Data/FormValidator/Filters.pm |
8 | 13 | lib/Data/FormValidator/Results.pm |
9 | MANIFEST This list of files | |
10 | MANIFEST.SKIP | |
11 | META.yml | |
12 | README | |
13 | RELEASE_NOTES | |
14 | 14 | t/00_base.t |
15 | 15 | t/02_code_ref.t |
16 | 16 | t/03_dependency.t |
32 | 32 | t/27_qualify_ref_happy_death.t |
33 | 33 | t/28_defaults_for_new.t |
34 | 34 | t/30_filter_definedness.t |
35 | t/FV_length.t | |
36 | t/ValidatorPackagesTest1.pm | |
37 | t/ValidatorPackagesTest2.pm | |
35 | 38 | t/any_errors.t |
36 | 39 | t/check_profile_syntax.t |
37 | 40 | t/constraint_method.t |
38 | 41 | t/constraint_method_string.t |
39 | t/constraint_method_zero.t | |
40 | 42 | t/constraint_regexp_map_profile_reuse.t |
41 | 43 | t/constraints_builtin.t |
42 | 44 | t/constraints_builtin_closure.t |
52 | 54 | t/filter_constraints.t |
53 | 55 | t/filters_builtin.t |
54 | 56 | t/filters_shouldnt_modify.t |
55 | t/FV_length.t | |
56 | 57 | t/get_filtered_data.t |
57 | 58 | t/get_input_data.t |
58 | 59 | t/missing_optional.t |
75 | 76 | t/upload_closure.t |
76 | 77 | t/upload_mime_types.t |
77 | 78 | t/upload_post_text.txt |
78 | t/ValidatorPackagesTest1.pm | |
79 | t/ValidatorPackagesTest2.pm | |
80 | 79 | test/00_base.badformat |
81 | 80 | test/00_base.profile |
0 | --- | |
1 | abstract: "Validates user input (usually from an HTML form) based\non input profile." | |
0 | --- #YAML:1.0 | |
1 | name: Data-FormValidator | |
2 | version: 4.66 | |
2 | 3 | author: |
3 | - 'Mark Stosberg <mark@summersault.com>' | |
4 | - Mark Stosberg <mark@summersault.com> | |
5 | abstract: |- | |
6 | Validates user input (usually from an HTML form) based | |
7 | on input profile. | |
8 | license: perl | |
9 | requires: | |
10 | Date::Calc: 5 | |
11 | Email::Valid: 0 | |
12 | File::MMagic: 1.17 | |
13 | Image::Size: 0 | |
14 | MIME::Types: 1.005 | |
15 | Perl6::Junction: 1.1 | |
16 | Regexp::Common: 0 | |
17 | Scalar::Util: 0 | |
18 | Test::More: 0 | |
19 | overload: 0 | |
20 | perl: 5.008 | |
4 | 21 | build_requires: |
5 | 22 | CGI: 3.48 |
6 | configure_requires: | |
7 | Module::Build: 0.36 | |
8 | generated_by: 'Module::Build version 0.3601' | |
9 | license: perl | |
10 | meta-spec: | |
11 | url: http://module-build.sourceforge.net/META-spec-v1.4.html | |
12 | version: 1.4 | |
13 | name: Data-FormValidator | |
14 | 23 | provides: |
15 | 24 | Data::FormValidator: |
16 | 25 | file: lib/Data/FormValidator.pm |
17 | version: 4.65 | |
26 | version: 4.66 | |
18 | 27 | Data::FormValidator::Constraints: |
19 | 28 | file: lib/Data/FormValidator/Constraints.pm |
20 | 29 | version: 4.65 |
23 | 32 | version: 4.65 |
24 | 33 | Data::FormValidator::Constraints::RegexpCommon: |
25 | 34 | file: lib/Data/FormValidator/Results.pm |
35 | version: 4.65 | |
26 | 36 | Data::FormValidator::Constraints::Upload: |
27 | 37 | file: lib/Data/FormValidator/Constraints/Upload.pm |
28 | 38 | version: 4.65 |
35 | 45 | Data::FormValidator::Results: |
36 | 46 | file: lib/Data/FormValidator/Results.pm |
37 | 47 | version: 4.65 |
38 | requires: | |
39 | Date::Calc: 5 | |
40 | Email::Valid: 0 | |
41 | File::MMagic: 1.17 | |
42 | Image::Size: 0 | |
43 | MIME::Types: 1.005 | |
44 | Perl6::Junction: 1.1 | |
45 | Regexp::Common: 0 | |
46 | Scalar::Util: 0 | |
47 | Test::More: 0 | |
48 | overload: 0 | |
49 | perl: 5.008 | |
50 | resources: | |
51 | license: http://dev.perl.org/licenses/ | |
52 | version: 4.65 | |
48 | generated_by: Module::Build version 0.2611 |
81 | 81 | unknowns |
82 | 82 | This is a list of fields which are unknown to the profile. Whether |
83 | 83 | or not this indicates an error in the user input is application |
84 | dependant. | |
84 | dependent. | |
85 | 85 | |
86 | 86 | new() |
87 | 87 | Using "new()" is only needed for advanced usage, including these cases: |
700 | 700 | unknowns |
701 | 701 | This is a list of fields which are unknown to the profile. Whether |
702 | 702 | or not this indicates an error in the user input is application |
703 | dependant. | |
703 | dependent. | |
704 | 704 | |
705 | 705 | constraints (profile key) |
706 | 706 | This is a supported but deprecated profile key. Using |
32 | 32 | |
33 | 33 | use vars qw( $VERSION $AUTOLOAD @ISA @EXPORT_OK %EXPORT_TAGS ); |
34 | 34 | |
35 | $VERSION = '4.65'; | |
35 | $VERSION = '4.66'; | |
36 | 36 | |
37 | 37 | require Exporter; |
38 | 38 | @ISA = qw(Exporter); |
223 | 223 | |
224 | 224 | This is a list of fields which are unknown to the profile. Whether or |
225 | 225 | not this indicates an error in the user input is application |
226 | dependant. | |
226 | dependent. | |
227 | 227 | |
228 | 228 | =back |
229 | 229 | |
1086 | 1086 | |
1087 | 1087 | This is a list of fields which are unknown to the profile. Whether or |
1088 | 1088 | not this indicates an error in the user input is application |
1089 | dependant. | |
1089 | dependent. | |
1090 | 1090 | |
1091 | 1091 | =back |
1092 | 1092 |
0 | #!perl | |
1 | # For RT#45177 | |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | ||
6 | use Test::More 'no_plan'; | |
7 | use Data::FormValidator; | |
8 | ||
9 | { | |
10 | my $results = Data::FormValidator->check({ nine_is_ok => 9 }, { | |
11 | required => [ 'nine_is_ok' ], | |
12 | constraint_methods => { 'nine_is_ok' => qr/^(9)$/ }, | |
13 | untaint_all_constraints => 1, | |
14 | }); | |
15 | is($results->valid('nine_is_ok'),9, "nine should be valid for 9 with capturing parens (untainted)"); | |
16 | } | |
17 | { | |
18 | my $results = Data::FormValidator->check({ nine_is_ok => 9 }, { | |
19 | required => [ 'nine_is_ok' ], | |
20 | constraint_methods => { 'nine_is_ok' => qr/^9$/ }, | |
21 | untaint_all_constraints => 1, | |
22 | }); | |
23 | is($results->valid('nine_is_ok'),9, "nine should be valid for 9 without capturing parens (untainted)"); | |
24 | } | |
25 | { | |
26 | my $results = Data::FormValidator->check({ zero_is_ok => 0 }, { | |
27 | required => [ 'zero_is_ok' ], | |
28 | constraint_methods => { 'zero_is_ok' => qr/^0$/ }, | |
29 | untaint_all_constraints => 1, | |
30 | }); | |
31 | is($results->valid('zero_is_ok'),0, "zero should be valid without capturing parens (untainted)"); | |
32 | } | |
33 | { | |
34 | my $results = Data::FormValidator->check({ zero_is_ok => 0 }, { | |
35 | required => [ 'zero_is_ok' ], | |
36 | constraint_methods => { 'zero_is_ok' => qr/^(0)$/ }, | |
37 | untaint_all_constraints => 1, | |
38 | }); | |
39 | is($results->valid('zero_is_ok'),0, "zero should be valid with capturing parens (untainted)"); | |
40 | } | |
41 | { | |
42 | my $results = Data::FormValidator->check({ nine_is_ok => 9 }, { | |
43 | required => [ 'nine_is_ok' ], | |
44 | constraint_methods => { 'nine_is_ok' => qr/^(9)$/ }, | |
45 | }); | |
46 | is($results->valid('nine_is_ok'),9, "nine should be valid for 9 with capturing parens"); | |
47 | } | |
48 | { | |
49 | my $results = Data::FormValidator->check({ nine_is_ok => 9 }, { | |
50 | required => [ 'nine_is_ok' ], | |
51 | constraint_methods => { 'nine_is_ok' => qr/^9$/ }, | |
52 | }); | |
53 | is($results->valid('nine_is_ok'),9, "nine should be valid for 9 without capturing parens"); | |
54 | } | |
55 | { | |
56 | my $results = Data::FormValidator->check({ zero_is_ok => 0 }, { | |
57 | required => [ 'zero_is_ok' ], | |
58 | constraint_methods => { 'zero_is_ok' => qr/^0$/ }, | |
59 | }); | |
60 | is($results->valid('zero_is_ok'),0, "zero should be valid without capturing parens"); | |
61 | } | |
62 | { | |
63 | my $results = Data::FormValidator->check({ zero_is_ok => 0 }, { | |
64 | required => [ 'zero_is_ok' ], | |
65 | constraint_methods => { 'zero_is_ok' => qr/^(0)$/ }, | |
66 | }); | |
67 | is($results->valid('zero_is_ok'),0, "zero should be valid with capturing parens"); | |
68 | } | |
69 | ||
70 | ||
71 | ||
72 |
0 | use Test::More tests => 4; | |
0 | use Test::More 'no_plan'; | |
1 | 1 | |
2 | BEGIN: { | |
3 | use_ok('Data::FormValidator'); | |
4 | use_ok('Data::FormValidator::ConstraintsFactory',qw(&make_length_constraint)); | |
5 | } | |
2 | use Data::FormValidator; | |
3 | use Data::FormValidator::ConstraintsFactory 'make_length_constraint'; | |
6 | 4 | |
7 | 5 | { |
8 | 6 | my $results = Data::FormValidator->check( |