| 1 |
4.88 August 28th, 2017 |
| 2 |
|
| 3 |
[MAINTENANCE] |
| 4 |
- Address "." being removed from @INC by using absolute filepaths - thanks Kent Fredric! |
| 5 |
|
| 6 |
4.87 May 14th, 2017 |
| 7 |
|
| 8 |
[MAINTENANCE] |
| 9 |
- Update cc routine to recognize new 2 series Mastercards |
| 10 |
|
| 11 |
4.86 March 26th, 2017 |
| 12 |
[NEW FEATURES] |
| 13 |
- Add three new profile methods: depedencies_regexp, dependent_optional, dependent_require_some |
| 14 |
|
| 15 |
[MAINTENANCE] |
| 16 |
- Bump VERSION in all classes to 5.85 |
| 17 |
|
| 18 |
4.85 Feb 25th, 2017 |
| 19 |
|
| 20 |
[MAINTENANCE] |
| 21 |
- Bump VERSION in all classes to 5.85 |
| 22 |
|
| 23 |
4.84 Feb 25th, 2017 |
| 24 |
|
| 25 |
[MAINTENANCE] |
| 26 |
- Various test file warning fixes |
| 27 |
- Change conditional loading of CGI to require version 4.35 or higher (4ce9ac9e) |
| 28 |
|
| 29 |
4.83 Feb 23rd, 2017 |
| 30 |
|
| 31 |
[MAINTENANCE] |
| 32 |
- Re-release of 4.82: tarball was missing files as "make dist" errored when it didn't find MANIFEST |
| 33 |
- Deleted unused Perl6 files |
| 34 |
|
| 35 |
4.82 Feb 23rd, 2017 |
| 36 |
|
| 37 |
[MAINTENANCE] |
| 38 |
- Made CGI dependency optional |
| 39 |
- Replaced Build.PL with Makefile.PL |
| 40 |
- Updated Makefile.PL constraints |
| 41 |
- Removed dependency on Perl6::Junctions |
| 42 |
- Moved the code to GitHub |
| 43 |
- Applied patches from: RT 77765, 78443, 10489 |
| 44 |
- Added shebang, warnings pragma to all test scripts |
| 45 |
- Perltidied tests scripts |
| 46 |
- Replaced is_tainted() sub with Scalar::Util::tainted() |
| 47 |
|
| 48 |
4.81 Jul 19th, 2013 |
| 49 |
|
| 50 |
[DOCUMENTATION] |
| 51 |
- There is no such thing as "array context". The documentation now refers to "list context" |
| 52 |
instead. |
| 53 |
|
| 54 |
- Fix "the the" typos. (Thanks to dsteinbrunner, RT#77901) |
| 55 |
|
| 56 |
[INTERNALS] |
| 57 |
- Somewhat modernizer Exporter usage. |
| 58 |
|
| 59 |
4.80 Nov 1st, 2012 |
| 60 |
|
| 61 |
[NEW FEATURES] |
| 62 |
- New built-in constraint_methods to test the number of values submitted for a |
| 63 |
particular field: |
| 64 |
|
| 65 |
FV_num_values(1), |
| 66 |
FV_num_values_between(1,2), # inclusive |
| 67 |
|
| 68 |
One way that garbage can get through a Data::FormValidator profile is |
| 69 |
when two values are submitted when only one is intended. In this |
| 70 |
case, this application could end up with a values like this: |
| 71 |
|
| 72 |
ARRAY(0x841214c) |
| 73 |
|
| 74 |
Using these new constraints, you can precisely control how many values |
| 75 |
are allowed for each field. |
| 76 |
|
| 77 |
[INTERNAL] |
| 78 |
- Source control hosting has been moved to http://hub.darcs.net |
| 79 |
You can now browse, pull and fork the darcs repo through this website. |
| 80 |
|
| 81 |
|
| 82 |
4.71 Oct 2nd, 2012 |
| 83 |
|
| 84 |
[BUG FIXES] |
| 85 |
- Custom messages for built-in constraints work again. It appears that this |
| 86 |
was broken in 4.70, which triggered a sleeper bug. |
| 87 |
|
| 88 |
(Thanks to Lee Carmichael, Mark Stosberg, RT#73235) |
| 89 |
|
| 90 |
4.70 11/11/11 |
| 91 |
|
| 92 |
[NEW FEATURES] |
| 93 |
- Built-in constraints in Constraints.pm can now be renamed: |
| 94 |
|
| 95 |
constraint_methods => { |
| 96 |
first_names => { |
| 97 |
constraint_method => FV_max_length(3), |
| 98 |
name => 'custom_length', |
| 99 |
} |
| 100 |
}, |
| 101 |
|
| 102 |
(Thanks to [email protected] for the suggestion, RT#49477) |
| 103 |
|
| 104 |
[INTERNALS] |
| 105 |
- modernize Constraints.pm and Results.pm a bit. |
| 106 |
- Module::Build added to configure_requires in Build.PL |
| 107 |
|
| 108 |
4.67 11/11/11 |
| 109 |
|
| 110 |
[INTERNALS] |
| 111 |
- modernize FormValidator.pm internals a bit |
| 112 |
- Update META.yml to exclude an internal package from getting indexed. |
| 113 |
|
| 114 |
4.66 Wed Feb 24 09:30:17 EST 2010 |
| 115 |
|
| 116 |
[DOCUMENTATION] |
| 117 |
- Typo fixes (Jonathan Yu) |
| 118 |
|
| 119 |
[INTERNALS] |
| 120 |
- Test suite fix for 5.11.1 and newer. |
| 121 |
|
| 122 |
4.65 Wed Dec 30 22:17:33 EST 2009 |
| 123 |
|
| 124 |
[NEW FEATURES] |
| 125 |
- New FV_replace() filter to simplify basic find-and-replace filters: |
| 126 |
field_filters => { |
| 127 |
first_name => FV_replace(qr/Mark/,'Don'), |
| 128 |
}, |
| 129 |
|
| 130 |
[BUG FIXES] |
| 131 |
- Untainted multi-line fields are no longer truncated after the first newline. |
| 132 |
(RT#44004, Thanks to Matthew Lawrence) |
| 133 |
- Fix bug when the constraint_method contains a capturing parens and 0 is a valid value. |
| 134 |
(RT#45177, Thanks to Junior Medina and Mark Stosberg) |
| 135 |
|
| 136 |
[DOCUMENTATION] |
| 137 |
- Typo fixes (Lyle) |
| 138 |
|
| 139 |
[INTERNALS] |
| 140 |
- Best Practice: Redundant <span> tag was removed from default error message formatting |
| 141 |
(RT#42926), Thanks to girlwithglasses) |
| 142 |
- Best Practice: eliminated some indirect object notation in the tests (Mark Stosberg) |
| 143 |
- Now require a new CGI.pm for the build stage (RT#49912, thanks to dsteinbrunner) |
| 144 |
- White space improvements (RT#30205, Thanks to Peter Liscovius) |
| 145 |
- Fixed a warning in the test suite (RT#42251, Thanks to Frank Wiegand) |
| 146 |
|
| 147 |
4.63 Sat Jan 3 12:46:15 EST 2009 |
| 148 |
[DOCUMENTATION] |
| 149 |
- Improve docs for writing your own constraints (girlwithglasses) |
| 150 |
|
| 151 |
4.62 Sat Jan 3 12:10:14 EST 2009 |
| 152 |
|
| 153 |
[DOCUMENTATION] |
| 154 |
- Fix typo in ConstraintsFactory docs (Geraint A. Edwards) |
| 155 |
- Clarified docs for get_filtered_data (Lisa Hagemann) |
| 156 |
- Clarify that 'field_filter_regexp_map' can take coderefs as values (Ron Savage) |
| 157 |
|
| 158 |
[INTERNALS] |
| 159 |
- Better diagnostics when load_profiles fails (Thoralf Klein) |
| 160 |
- Improved portability of t/untaint.t (Alexandr Ciornii) |
| 161 |
- Make some tests conditional on Date::Calc being installed (Frank Wiles) |
| 162 |
|
| 163 |
4.61 Mon Jun 16 14:37:31 EDT 2008 |
| 164 |
|
| 165 |
[INTERNALS] |
| 166 |
- packaging issue from Perl 4.60 resolved. |
| 167 |
|
| 168 |
4.60 Mon Jun 16 14:10:14 EDT 2008 |
| 169 |
|
| 170 |
[NEW FEATURES] |
| 171 |
- Dependencies can now be specified using a code ref. |
| 172 |
Thanks to Bradley C Bailey, via RT#24935. |
| 173 |
|
| 174 |
[BUG FIXES] |
| 175 |
- length constraints for min, max and 'between' now work for lengths |
| 176 |
of 32k and longer. (Carl Vincent). |
| 177 |
- We now use Email::Valid to validate e-mail addresses instead of |
| 178 |
our own regrex. Email::Valid passed all our our existing regression |
| 179 |
tests for e-mail addresses that should pass and fail. Email::Valid |
| 180 |
also correctly recognizes emails with single quote characters in them. |
| 181 |
These are valid, but our regex didn't recognize them. (Mark Stosberg) |
| 182 |
|
| 183 |
[INTERNALS] |
| 184 |
- Typo in Constraints documentation corrected by K B Shiv Kumar (RT#32358) |
| 185 |
- Add some tests and docs for "date_and_time" constraint, from |
| 186 |
Data::FormValidator:::Constraints::Dates. It appears there may still |
| 187 |
exist a leap-year bug with the date parser. See the TODO test in |
| 188 |
t/dates_closure.t for details. An alternative is to use |
| 189 |
Data::FormValidator::Constraints::DateTime |
| 190 |
(Mark Stosberg, Matt Christian) |
| 191 |
|
| 192 |
4.57 Thu Nov 1 22:47:13 EDT 2007 |
| 193 |
[BUG FIXES] |
| 194 |
- The min max and length_between constraints now allow multi-line input, |
| 195 |
Thanks to Carl Vincent. RT##30221. If we had only used the Regex style |
| 196 |
prescribed by the Perl Best Practices book in the first place, this |
| 197 |
wouldn't have been a problem! |
| 198 |
|
| 199 |
[INTERNALS] |
| 200 |
- Makefile.PL to updated to explicitly require 5.008; |
| 201 |
- Fix doc link to "Old School Constraints", thanks to rjbs. |
| 202 |
|
| 203 |
4.56 Wed Oct 31 12:34:32 EDT 2007 |
| 204 |
[INTERNALS] |
| 205 |
- declare that we rely on 5.8, because some 5.6 tests were failing. |
| 206 |
A patch for 5.6 compatibility would be welcome. Thanks to rjbs for the prod. |
| 207 |
|
| 208 |
4.55 Sun Oct 21 11:41:41 EDT 2007 |
| 209 |
[BUG FIXES] |
| 210 |
- Constraints in Upload.pm now apply to filtered data, not raw data. |
| 211 |
(Graham TerMarsch, Mark Stosberg, RT#24702) |
| 212 |
|
| 213 |
4.54 Sun Oct 21 09:27:07 EDT 2007 |
| 214 |
[INTERNALS] |
| 215 |
- It looks like 4.53 got uploaded wrong, appearing as the code for 4.50. |
| 216 |
|
| 217 |
4.53 Sat Oct 20 15:57:56 EDT 2007 |
| 218 |
[BUG FIXES] |
| 219 |
- Invalid fields should still be invalid, even when missing_optional_valid is true. |
| 220 |
Patch thanks to Robert Juliano. [RT#28860] |
| 221 |
|
| 222 |
[INTERNALS] |
| 223 |
- Improve documentation link, thanks to Robert Stockdale [RT#29510] |
| 224 |
- Give a plug to Data::FormValidator::Constraints::MethodsFactory. Recommended! |
| 225 |
- s/foreach /for /g throughout the code, per Perl Best Practices |
| 226 |
|
| 227 |
4.52 Fri Oct 19 15:39:14 EDT 2007 |
| 228 |
No code changes. |
| 229 |
|
| 230 |
[INTERNALS] |
| 231 |
- Fix PERL5LIB issue with untaint.t, Thanks to Matt Trout and others [RT#30126] |
| 232 |
|
| 233 |
4.51 Fri Jul 13 23:31:43 EDT 2007 |
| 234 |
[BUG FIXES] |
| 235 |
- Quit assuming that because the first element of an array is undef, the |
| 236 |
the whole thing is undef. (RT#24703, GTERMARS, Paul Blair) |
| 237 |
|
| 238 |
- For the "file_format" file upload constraint, File::MMagic sometimes |
| 239 |
wrongly returns the generic "application/octet-stream" MIME type instead |
| 240 |
of the correct MIME type. We now this return value as meaning "I don't |
| 241 |
know" and try the MIME type sent by the browser if this happens. |
| 242 |
(Mark Stosberg) |
| 243 |
|
| 244 |
- for the "file_format" file upload constraint, we now do a |
| 245 |
case-insensitive comparison of the MIME type provided by the browser, |
| 246 |
following the MIME standard. This bug was masked because we check the |
| 247 |
returned MIME type by File::MMagic first. Because it generally works |
| 248 |
and returns a lower-case result, it didn't matter. However, it some cases |
| 249 |
File::MMagic misbehaves under mod_perl, causing the issue to matter. |
| 250 |
(Matt Christian, Mark Stosberg) |
| 251 |
|
| 252 |
[INTERNALS] |
| 253 |
- Start requiring and using Scalar::Util, which prevents UNIVERSAL::can() form generating warnings. |
| 254 |
(RT#25873, Dave O'Neill) |
| 255 |
|
| 256 |
- Start requiring Perl6::Junction, which we had previously copy/pasted a bit |
| 257 |
of into DFV. (Unlike some of the other Perl6 namespace modules, this one |
| 258 |
does /not/ use a source filter, and is addictively simple and useful. |
| 259 |
|
| 260 |
4.50 Mon Dec 4 21:28:09 EST 2006 |
| 261 |
|
| 262 |
[ENHANCEMENTS] |
| 263 |
- New method for constraint writing: get_filtered_data(). |
| 264 |
(Graham TerMarsch, Mark Stosberg, RT#22589) |
| 265 |
|
| 266 |
- Stronger profile checking, to insure that all constraint_method values |
| 267 |
are code references. Note: This explicitly simplifies things compared to |
| 268 |
the 'constraints' system. Bare strings declarations are not allowed with |
| 269 |
'constraint_methods'. (Mark Stosberg) |
| 270 |
|
| 271 |
- Numerous documentation and comment typo fixes (Evan Zacks) |
| 272 |
|
| 273 |
- Clarified the docs for overriding msgs (RT#18050) |
| 274 |
|
| 275 |
[BUG FIXES] |
| 276 |
- ':all' was documented as a group of constraints to import, but it didn't |
| 277 |
work. The documentation was updated to recommend ':closures' instead. |
| 278 |
(PURDY, RT#21052) |
| 279 |
|
| 280 |
- FV_eq_with now works with CGI.pm-style objects as input. (Jason Crummack) |
| 281 |
|
| 282 |
- Fix documented example of using constraint methods. (Brian Lozier) |
| 283 |
|
| 284 |
- When a constraint and a constraint_regexp_map matched the same field, |
| 285 |
only the ones from the map where being used in one case. This was a |
| 286 |
regression since the 4.0 release. A new regression test was also added |
| 287 |
for this case. (Matt Christian) |
| 288 |
|
| 289 |
4.49_01 Tue Oct 3 14:13:59 EDT 2006 |
| 290 |
|
| 291 |
[ENHANCEMENTS] |
| 292 |
- New defaults_regexp_map profile key, useful for dynamically generated |
| 293 |
checkbox fields. (Mark Stosberg) |
| 294 |
|
| 295 |
4.40 Mon Aug 21 19:41:24 EDT 2006 |
| 296 |
|
| 297 |
[BUG FIXES] |
| 298 |
- All FV_ closures are now exported with ":closures". (Ed Pigg, Mark Stosberg) |
| 299 |
|
| 300 |
[ENHANCEMENTS] |
| 301 |
- Added new constraint for the common case of comparing one field with another, |
| 302 |
such as a word confirmation field. Example: |
| 303 |
constraint_methods => { |
| 304 |
password => FV_eq_with('password_confirm'), |
| 305 |
} |
| 306 |
(Mark Stosberg) |
| 307 |
|
| 308 |
4.30 Mon Jul 10 21:41:37 EDT 2006 |
| 309 |
[ENHANCEMENTS] |
| 310 |
- A new method for constraint writers has been added: untainted_constraint_value(). |
| 311 |
If you have written a constraint which untaints, use this method to return the |
| 312 |
untainted result. It will prepare the right result whether the user has requested |
| 313 |
untainting or not. (Mark Stosberg) |
| 314 |
|
| 315 |
- New built-in constraints added: |
| 316 |
|
| 317 |
FV_min_length(3), |
| 318 |
FV_max_length(100), |
| 319 |
FV_length_between(3,100), |
| 320 |
|
| 321 |
These constraints can optionally perform untainting. (Mark Stosberg) |
| 322 |
|
| 323 |
- We now work around a bug in File::MMagic which could cause some filehandles |
| 324 |
to be corrupted after after the file_format constraint was used. |
| 325 |
|
| 326 |
[BUG FIXES] |
| 327 |
- Regexp::Common regular expressions which accepted zero as a valid input would |
| 328 |
have wrongly failed their constraints unless untainting was enabled. (Mark Stosberg) |
| 329 |
|
| 330 |
[INTERNALS] |
| 331 |
- Improved documentation for built-in constraints. (Mark Stosberg) |
| 332 |
|
| 333 |
4.20 Mon Jun 12 20:44:36 EDT 2006 |
| 334 |
[ENHANCEMENTS] |
| 335 |
- Documentation in Data::FormValidator::Filters has been improved. (Mark Stosberg} |
| 336 |
- Added FV_split() a new filter that makes it super-easy to apply the same constraint |
| 337 |
to a list of values passed in a single field, such as a comma separated list of e-mail |
| 338 |
addresses. (Mark Stosberg). |
| 339 |
|
| 340 |
[BUG FIXES] |
| 341 |
- For input given as a hashref containing array references, values could |
| 342 |
have been mistakenly modified by reference through filters. We now |
| 343 |
explicitly copy elements in these case, to avoid modifying the input. |
| 344 |
(RT#19592) |
| 345 |
|
| 346 |
4.14 Fri Feb 17 08:59:40 EST 2006 |
| 347 |
[ENHANCEMENTS] |
| 348 |
- Consider a field with only a null character to be invalid (Jamie Krasnoo) |
| 349 |
|
| 350 |
[BUG FIXES] |
| 351 |
- Fix bug in cc_number constraint, which was only present when used as a "constraint_method". (Evan A. Zacks) |
| 352 |
|
| 353 |
4.13 |
| 354 |
[BUG FIXES] |
| 355 |
- Updated overloading syntax to work with Template::Stash (frank) |
| 356 |
|
| 357 |
4.12 Thu Jan 5 21:07:50 EST 2006 |
| 358 |
[INTERNALS] |
| 359 |
- Fix test suite to pass when CGI::Simple is not installed |
| 360 |
(Lee Carmichael, Davide Dente) |
| 361 |
|
| 362 |
4.11 Tue Jan 3 18:38:23 EST 2006 |
| 363 |
[ENHANCEMENTS] |
| 364 |
- A new constraint for minimum image dimensions was added in |
| 365 |
Data::FormValidator::Constraints::Upload (Lee Carmichael) |
| 366 |
|
| 367 |
[INTERNALS] |
| 368 |
- refactoring of Upload.pm and t/upload.t (Lee Carmichael) |
| 369 |
|
| 370 |
4.10 Thu Dec 22 19:55:34 EST 2005 |
| 371 |
|
| 372 |
[ENHANCEMENTS] |
| 373 |
- The msgs key can now take a callback, allow users to override how error |
| 374 |
message generation is done. Some alternative message generate routines |
| 375 |
will hopefully be published soon. (Cees Hek, Chris Laco and others) |
| 376 |
|
| 377 |
- New profile key: untaint_regexp_map (Michael Peters) |
| 378 |
|
| 379 |
[BUG FIXES] |
| 380 |
- bug was fixed for dependent fields that had false values, but were valid |
| 381 |
(Emanuele Zeppieri) |
| 382 |
|
| 383 |
- Failed constraints for multiple fields with the same name no longer return duplicate |
| 384 |
error messages (Will Hawes) |
| 385 |
|
| 386 |
- value of any_errors was wrongly added to msgs even when there are no errors |
| 387 |
(RT#14942, report and test script by Michael Graham) |
| 388 |
|
| 389 |
[INTERNALS] |
| 390 |
- bump Date::Calc requirement (RT#15715) |
| 391 |
|
| 392 |
4.02 Wed Aug 31 21:22:58 EST 2005 |
| 393 |
|
| 394 |
[ENHANCEMENTS] |
| 395 |
- the use of custom signal handers for "die" has now been localized to |
| 396 |
avoid interfering with other applications. (Josh Miller). |
| 397 |
|
| 398 |
- initial support for qr in constraint_method profile key |
| 399 |
|
| 400 |
[BUG FIXES] |
| 401 |
- Updated ::Constraints example docs to be accurate: recommend :closures, not :all |
| 402 |
|
| 403 |
[INTERNALS] |
| 404 |
- provide a more accurate debugging message for constraint_method_regexp_map |
| 405 |
|
| 406 |
4.01 Sat Aug 20 13:16:47 EST 2005 |
| 407 |
|
| 408 |
[ENHANCEMENTS] |
| 409 |
- get_input_data() now supports the parameters "as_hashref => 1" to |
| 410 |
return the input data in a uniform way. |
| 411 |
|
| 412 |
[INTERNALS] |
| 413 |
- Constraints may refer to fields that are 'unknown' to |
| 414 |
Data::FormValidator. These unknown values will remain unfiltered |
| 415 |
as before. (Michael Peters). |
| 416 |
|
| 417 |
- _get_data() was renamed to _get_input_as_hash(). You shouldn't care. |
| 418 |
|
| 419 |
4.00 Sun Aug 14 10:57:25 EST 2005 |
| 420 |
|
| 421 |
*** NOTE *** |
| 422 |
This a major update with a significant code changes. While the test suite |
| 423 |
indicates we have 100% compatibility with 3.x, you are encouraged to test |
| 424 |
this release with your own applications before deploying it in a production |
| 425 |
environment. |
| 426 |
|
| 427 |
[ENHANCEMENTS] |
| 428 |
- The constraints interface has been overhauled to be more intuitive to use |
| 429 |
with parameterized constraints. This included added new two new profile |
| 430 |
keys: 'constraint_methods' and 'constraint_method_regexp_map'. All of |
| 431 |
the old syntax is still supported, but de-emphasized in the documentation. |
| 432 |
See RELEASE_NOTES for details. |
| 433 |
|
| 434 |
- A new method has been added to help building custom constraints: |
| 435 |
"set_current_constraint_name('foo')" will set the name of a constraint |
| 436 |
from within itself. An alias named 'name_this()' is provided for brevity. |
| 437 |
See the section on "Writing your own constraints" in DFV::Constraints |
| 438 |
for details. |
| 439 |
|
| 440 |
- success() method added to Results object. This is an easy way to check |
| 441 |
that there were no missing or invalid fields. (Michael Peters). |
| 442 |
|
| 443 |
- 'separator' was misspelled consistently in the docs, code and tests. |
| 444 |
The proper spelling as well as the legacy typo spelling are now |
| 445 |
supported, although the typo'ed version is no longer documented, except |
| 446 |
for here. :) Thanks to Terrence Brannon for spotting this. |
| 447 |
|
| 448 |
- The 'msgs' hash in the profile is now validated to make sure it includes only |
| 449 |
valid keys. This should help to spot some errors faster. |
| 450 |
|
| 451 |
- ::Constraints::Upload now supports CGI::Simple, thanks to David Emery. |
| 452 |
|
| 453 |
- Documentation for required_regexp has been improved. (William McKee) |
| 454 |
|
| 455 |
- support for coderefs as default values (Marcello) |
| 456 |
|
| 457 |
- Improved field_filters documentation, thanks to Andrew Brosnan. |
| 458 |
|
| 459 |
[BUG FIXES] |
| 460 |
- RT#12220: Canadian Province RE were updated. (Steve Simms). |
| 461 |
|
| 462 |
- The preferred MIME type was not being returned by the 'file_format' |
| 463 |
constraint for file uploads. This would have only affected cases where |
| 464 |
the mime type sent by the browser differed from the one detected by DFV. |
| 465 |
Thanks to Randal Schwartz for spotting this. (RT#12744). |
| 466 |
|
| 467 |
- Profile re-use when constraint_regexp_map is used is now fixed |
| 468 |
(Thanks to Cees Hek). |
| 469 |
|
| 470 |
- The date_and_time constraint now understands this format: MMDDYYYY. |
| 471 |
(RT#12111, thanks to JMAY) |
| 472 |
|
| 473 |
- This one is worth a brief explanation. When this old syntax was used: |
| 474 |
|
| 475 |
my ( $valid, $missing, $invalid, $unknown ) = Data::FormValidator->validate({}, {} ); |
| 476 |
|
| 477 |
$invalid would be returned as an empty arrayref if there were no |
| 478 |
invalids. This return value was undocumented, and was later changed to |
| 479 |
be 'undef' sometime between 3.50 and 3.70. However, I found that some |
| 480 |
applications, including Cascade, depended on the undocumented return |
| 481 |
value (which they shouldn't have). |
| 482 |
|
| 483 |
I have now reverted the behavior to returning an empty arrayref in this |
| 484 |
case, added a test for it, and updated the docs to be explicit about the |
| 485 |
return value. This will save some people unexpected breakages when |
| 486 |
upgrading DFV from a very old version with very old applications. |
| 487 |
|
| 488 |
Those who use the $results object are unaffected. |
| 489 |
|
| 490 |
[INTERALS] |
| 491 |
- Add many failing TODO tests for built-in filters. See t/filters_builtin.t |
| 492 |
|
| 493 |
- A new test was added to check that no warnings are emitted when an untainted |
| 494 |
constraint returns undef (Michael Peters) |
| 495 |
|
| 496 |
* 3.x releases after 3.63 happened on a different branch. All of the |
| 497 |
improvements there should be reflected above. |
| 498 |
|
| 499 |
3.63 |
| 500 |
[BUG FIXES] |
| 501 |
- email validation was beefed up to not permit spaces with e-mails |
| 502 |
or semi-colons to get through. Thanks to Jason Crome for some tests |
| 503 |
to this, and the Mail::VRFY module, which was the source of the |
| 504 |
improved RE. |
| 505 |
|
| 506 |
[INTERNALS] |
| 507 |
- Added a couple more test to the distribution which were missing in |
| 508 |
the MANIFEST |
| 509 |
|
| 510 |
3.62 Fri Oct 8 22:55:49 EST 2004 |
| 511 |
[INTERNALS] |
| 512 |
- Removed experimental label from 'msgs' functionality. |
| 513 |
- Beefed up test suite for dependencies and dependency_groups (Drew Taylor) |
| 514 |
|
| 515 |
3.61 Mon Sep 20 18:10:23 EST 2004 |
| 516 |
[BUG FIXES] |
| 517 |
- file_format from ::Constraints::Upload now handles non-existent files more |
| 518 |
gracefully. (Evan A. Zacks) |
| 519 |
|
| 520 |
3.60 Mon Sep 20 18:10:23 EST 2004 |
| 521 |
[BUG FIXES] |
| 522 |
- file_max_bytes seemed to never be reporting failure. |
| 523 |
|
| 524 |
3.59 Thu Jul 02 2004 |
| 525 |
[ENHANCEMENTS] |
| 526 |
- Added more tests for Date constraints, and removed some more warnings (Michael Dorman) |
| 527 |
|
| 528 |
[BUG FIXES] |
| 529 |
- Fixed failing dependency check happening sometimes with a CGI object as input. (Drew Taylor) |
| 530 |
|
| 531 |
3.58 Wed May 05 2004 |
| 532 |
[ENHANCEMENTS] |
| 533 |
- Test suite has been migrated further to 'Test::More' style, and |
| 534 |
all tests should complete without any warnings. A big thanks |
| 535 |
goes to Gabor Szabo for this work. |
| 536 |
|
| 537 |
3.57 Wed Apr 21 2004 |
| 538 |
[ENHANCEMENTS] |
| 539 |
- 'validator_packages' now handles the importing of filters as well as constraints. |
| 540 |
(Ronald Kimball) |
| 541 |
|
| 542 |
- Added profile validation check for hashref style constraints. This will |
| 543 |
make typos in key names easier to find. (Barry Hoggard, for demonstrating |
| 544 |
the need.) |
| 545 |
|
| 546 |
[BUG FIXES] |
| 547 |
- no longer try to use a Carp module method without having it loaded. Instead, |
| 548 |
we just call "die" now. (Gunnar Wolf) |
| 549 |
|
| 550 |
3.56 Fri Apr 16 2004 |
| 551 |
[BUG FIXES] |
| 552 |
- Fixed a mis-handling of unknown variables. Functionality brought inline |
| 553 |
with documented behaviour (Richard Clarke) |
| 554 |
- fixed bug image dimensions test in DFV::Constraints::Upload (Barry Hoggard) |
| 555 |
|
| 556 |
[ENHANCEMENTS] |
| 557 |
- added mention of HTML::Template::Associate::FormValidator to SEE ALSO |
| 558 |
|
| 559 |
3.55 Wed Mar 25 2004 |
| 560 |
- better diagnostics when a filters fail. |
| 561 |
|
| 562 |
3.54 Wed Mar 24 2004 |
| 563 |
[BUG FIXES] |
| 564 |
- Fixed a mis-handling of invalid constraints introduced in 3.53 (Kevin Baker). |
| 565 |
|
| 566 |
[ENHANCEMENTS] |
| 567 |
- Refactored and improved some contraint related tests (Kevin Baker) |
| 568 |
- clarified documentation for uploading constraints to mention that a |
| 569 |
CGI.pm object is needed for input. |
| 570 |
|
| 571 |
3.53 Mon Mar 22 2004 |
| 572 |
[BUG FIXES] |
| 573 |
- Removed bug introduced in 3.52 that would have mis-handled files that had |
| 574 |
some filters applied, and were then used as parameters in constraints for |
| 575 |
multiple fields. (Kevin Baker) |
| 576 |
- Possibly fixed t/24_upload.t test on Windows platforms (podmaster) |
| 577 |
|
| 578 |
3.52 Sun Mar 21 2004 |
| 579 |
[BUG FIXES] |
| 580 |
- After a constraint failed, future constraints relying on the same input |
| 581 |
parameters may have falsely failed. (Kevin Baker) |
| 582 |
- Untainting of false values (such as '0') was broken, and has been fixed. |
| 583 |
(Kato Atsushi) |
| 584 |
|
| 585 |
[ENHANCEMENTS] |
| 586 |
- the profile syntax checker now reports all invalid keys, instead of just |
| 587 |
the first one. Also, this code was refactored to be a bit faster. (Kevin Baker). |
| 588 |
|
| 589 |
|
| 590 |
3.51 Thu Feb 26 2004 |
| 591 |
[THINGS THAT MIGHT BREAK YOUR CODE] |
| 592 |
- The default formatting now uses the 'class' attribute in the <span> tag instead |
| 593 |
of the 'id' attribute. This shouldn't be a big deal and may actually make |
| 594 |
CSS styling easier, but it is a change. (Drew Taylor) |
| 595 |
|
| 596 |
[BUG FIXES] |
| 597 |
- In some cases empty fields were marked as 'valid' under mod_perl when they shouldn't be. |
| 598 |
(Drew Taylor) |
| 599 |
- Prevent unnecessary death due to $@ being set. (Kevin Baker) |
| 600 |
- Fixed documentation typo related to writing your own constraints (Stewart Russell) |
| 601 |
|
| 602 |
[ENHANCEMENTS] |
| 603 |
- valid() can now return multiple values in list context. |
| 604 |
- Mention Data::FormValidator::Util::HTML |
| 605 |
- Added new t/constraints_builtin.t as a beginning of more through testing |
| 606 |
of the built-in constraints. |
| 607 |
- Several documentation updates (Kevin Baker) |
| 608 |
|
| 609 |
3.50 Mon Jan 12 2004 |
| 610 |
- No functionality changes since 3.49_1, I'm just declaring it stable. |
| 611 |
- I did sneak in the addition of a $VERSION in a couple included modules |
| 612 |
where none had been provided before. |
| 613 |
|
| 614 |
3.49_1 |
| 615 |
[THINGS THAT MIGHT BREAK YOUR CODE] |
| 616 |
- A change has been made to Data::FormValidator::Constraints::Upload, |
| 617 |
and only affects constraints in that module. Meta data will no longer |
| 618 |
be provided by adding additional "_info" fields to the valid hash. |
| 619 |
The same data is now available through the new meta() method of the |
| 620 |
Data::FormValidator::Results object. |
| 621 |
|
| 622 |
[NEW FEATURES] |
| 623 |
- A new meta() method has been added to the Data::FormValidator::Results |
| 624 |
class. This function allows constraints to communicate meta data |
| 625 |
they discover about the values during the validation process. |
| 626 |
For example, a file size may be discovered while checking to see |
| 627 |
if the file size is too large. This is only currently being |
| 628 |
used in Data::FormValidator::Constraints::Upload. |
| 629 |
|
| 630 |
3.15 Sun Nov 03 2003 |
| 631 |
- Instead of explictly supporting CGI and Apache::Request objects, now any |
| 632 |
object which has a param() method can be used. In particular, this allows |
| 633 |
CGI::Simple to be used. |
| 634 |
|
| 635 |
Before, if you used an object which was not CGI or Apache::Request, it would |
| 636 |
treat the object as a hash reference and possibly work. Now it will die |
| 637 |
with a diagnostic message in this case. (Cees Hek) |
| 638 |
|
| 639 |
- Many documentation typo fixes (Cees Hek and Timothy Appnel) |
| 640 |
|
| 641 |
- The dependency on Module::Build to install the distribution has been |
| 642 |
removed. Now either Module::Build or the traditional MakeMaker system can |
| 643 |
be used. |
| 644 |
|
| 645 |
3.14 |
| 646 |
[BUG FIXES] |
| 647 |
- fixed POD syntax issue in Constraints.pm that was causing a 'make test' |
| 648 |
failure with Test::Pod >.96 |
| 649 |
|
| 650 |
3.13 Sun Nov 02 2003 |
| 651 |
[THINGS THAT MAY BREAK YOUR CODE] |
| 652 |
- How the Regexp::Common integration has changed. The old functionality was |
| 653 |
to match the regular expression as a substring of the field being |
| 654 |
testing. Now it is more restrictive and only matches the entire string. |
| 655 |
This is how all the other filters worked, and is probably how you expected |
| 656 |
the Regexp::Common filters to work as well. |
| 657 |
|
| 658 |
[BUG FIXES] |
| 659 |
- uninitialized values in filters no longer cause warnings. (addresses bug #2751). |
| 660 |
- documentation typo fixes |
| 661 |
|
| 662 |
[ENHANCEMENTS] |
| 663 |
- improved syntax to be compatible with Perl 5.005 |
| 664 |
- Added "cover" method to "Build" script. This uses Devel::Cover to generate |
| 665 |
a coverage report for the script |
| 666 |
- About 5 new tests for loading profiles from a file |
| 667 |
|
| 668 |
3.12 Tue Jun 22 2003 |
| 669 |
- don't die in ::Upload if we can't find the tmp file. |
| 670 |
Instead, the constraint fails and a warning is emitted. |
| 671 |
|
| 672 |
- Added "image/pjpeg" to list of default mime types to use with file_format. |
| 673 |
This is for the "progressive JPEG" format. |
| 674 |
|
| 675 |
- Several documentation improvements, thanks to Mike Fragassi. |
| 676 |
|
| 677 |
3.11 Tue May 27 2003 |
| 678 |
- Bug Fix: "qr" support now works better with older versions of Perl |
| 679 |
(Mike Fragassi) |
| 680 |
|
| 681 |
3.10 Mon May 26 2003 |
| 682 |
- New Feature: Any regular expression from Regexp::Common can now be used |
| 683 |
directly as a named constraint. See Data::FormValidator::Constraints |
| 684 |
documentation for an example syntax. |
| 685 |
|
| 686 |
- Bug Fix: fixed imported_validators error that could occur if the same |
| 687 |
profile was used more than once with the same DFV object. |
| 688 |
|
| 689 |
- improved support and testing of 'qr' a bit. |
| 690 |
|
| 691 |
|
| 692 |
3.01 Thu May 15 2003 |
| 693 |
This release fixes addresses a couple of issues related to the new support |
| 694 |
for error message handling through msgs() and "qr" support. If you aren't |
| 695 |
using these features, there's no need to upgrade. |
| 696 |
|
| 697 |
- New Feature: Updated msgs() documentation and removed the requirement |
| 698 |
that 'msgs' be defined in profile for default formatting to be used with |
| 699 |
msgs() method call. |
| 700 |
|
| 701 |
- Bug Fix: Using named constraints wtih the new "qr" support now works. |
| 702 |
|
| 703 |
3.00 Sun May 11 2003 |
| 704 |
- New Feature: added debug option |
| 705 |
- Make default msgs in "new" constructor work as it was supposed it 2.11_04 |
| 706 |
- Bug Fix: missing_optional_valid now works better when the input data comes |
| 707 |
from a CGI.pm or Apache::Request object (David Ranney) |
| 708 |
- Upload.pm syntax updated to no longer require Perl 5.6+ syntax |
| 709 |
- New Feature: Upload.pm now first tries to use File::MMagic and MIME::Type |
| 710 |
to more intelligently determine the file type and an appropriate extension. |
| 711 |
|
| 712 |
2.11_04 |
| 713 |
- Major documentation overhaul. It should now be easier to browse and grok. |
| 714 |
|
| 715 |
- New Feature: defaults can be passed to new() that will be used for all |
| 716 |
forms made from that object. |
| 717 |
|
| 718 |
- New Feature: Added support for quoting regular expressions using "qr" |
| 719 |
instead of defining them as strings. This is now the preferred method. |
| 720 |
Defining regular expressions as strings is deprecated but supported. |
| 721 |
|
| 722 |
- New Feature: Friendly die statements when you have typos in filter |
| 723 |
and constraint names. (Instead of mysterious suicide). |
| 724 |
|
| 725 |
- Fixed syntax error in Upload.pm documentation |
| 726 |
- Bug Fix: error checking in valid_file_format in Upload.pm |
| 727 |
- Bug Fix: fixed bug related to returning constraint names introduced |
| 728 |
in 2.11_03. |
| 729 |
|
| 730 |
2.11_03 |
| 731 |
- The code has now been reorganized, following the module of HTML::FormValidator. |
| 732 |
Filters, Constraints, and Results are now all handled in their own modules. |
| 733 |
|
| 734 |
- The "msgs" error functional has now been re-designed, and is not |
| 735 |
backwards compatible. Feedback on this experimental addition is encouraged. |
| 736 |
|
| 737 |
- New Feature: Added ConstraintsFactory.pm module to distribution |
| 738 |
|
| 739 |
2.11_02 |
| 740 |
- New Feature: Support for Apache::Request objects |
| 741 |
- New Feature: Now when constraint_regexp_map is used |
| 742 |
and one or more constraints is already defined, the new |
| 743 |
matching constraint is added to the list of constraints |
| 744 |
applied, rather than superceding the old one. |
| 745 |
|
| 746 |
2.11_01 (A BETA release) |
| 747 |
|
| 748 |
- New Feature: Added Data::FormValidator::Constraints::Upload |
| 749 |
to the distribution. |
| 750 |
|
| 751 |
- New Feature: Added Data::FormValidator::Constraints::Dates |
| 752 |
to the distribution. |
| 753 |
|
| 754 |
- The functionality of returning errors with the experimental |
| 755 |
msgs feature has changed a bit. Now if you define multiple constraints, |
| 756 |
the messages will always be returned as an array reference, instead of |
| 757 |
when only there was more than one message. This should improve |
| 758 |
integration with HTML::Template. |
| 759 |
|
| 760 |
- New Feature: When using multiple constraints defined as hash references, |
| 761 |
the "name" attribute will default to name of the constraint, if it is |
| 762 |
being called by name. |
| 763 |
|
| 764 |
- added documentation for writing your own validation routines. |
| 765 |
- New Feature: Added 'valid' accessor/mutator method to manage |
| 766 |
and manipulate the result set. This can be useful to modify |
| 767 |
the result set from within a constraint. |
| 768 |
|
| 769 |
- New Feature: Added "constraint_method" as an alternative |
| 770 |
to "constraint" in the hash-based constraint definition. |
| 771 |
Related to this, there are new accessor methods for use |
| 772 |
inside of custom constraints: |
| 773 |
get_input_data(); |
| 774 |
get_current_constraint_field(); |
| 775 |
get_current_constraint_value(); |
| 776 |
|
| 777 |
This whole arrangement brings support for multi-valued constraints with |
| 778 |
constraint_regexp_map |
| 779 |
|
| 780 |
- various documentation clean ups |
| 781 |
|
| 782 |
2.10 Sun Apr 20 2003 |
| 783 |
- New Feature: (EXPERIMENTAL) Added support for returning error messages |
| 784 |
for missing and invalid fields (Juan Jose Natera Abreu). |
| 785 |
This piece of functionality is marked as experimental because |
| 786 |
the interface may change in the near future, and it has not been |
| 787 |
tested as well as rest of the module. Search in the documentation for |
| 788 |
"msgs" for the details. |
| 789 |
|
| 790 |
- New Feature: added support for building with Module::Build. For more |
| 791 |
information on Module::Build, read this: |
| 792 |
http://magnonel.guild.net/~schwern/talks/MakeMaker_Is_DOOMED/slides/ |
| 793 |
|
| 794 |
- New Feature: included SIGNATURE file in distribution for verification |
| 795 |
with Module::Signature |
| 796 |
|
| 797 |
2.04 Fri Apr 11 2003 |
| 798 |
- Bug Fix: multiple parameters passed to a constraint |
| 799 |
were not being handled appropriately in some cases. (Markus) |
| 800 |
- Bug Fix: Calling "validate" as a class method in combination |
| 801 |
with using "validator_packages no longer causes a problem. |
| 802 |
|
| 803 |
2.03 Thu Apr 10 2003 |
| 804 |
- Bug Fix: use of "delete" syntax with multiple values updated |
| 805 |
to be backwards compatible with Perl 5.005 (Jonathan Buhacoff) |
| 806 |
|
| 807 |
2.02 Wed Apr 09 2003 |
| 808 |
- Bug Fix: fixed bug with required_regexp and optional_regexp triggered |
| 809 |
if there is no required_regexp or optional_regexp in the profile *and* |
| 810 |
something exists in $@ (Dom) |
| 811 |
|
| 812 |
2.01 Wed Apr 02 2003 |
| 813 |
- Bug Fix: Fix bug introduced in 1.93 which didn't handle |
| 814 |
input values appropriately that were references to other things |
| 815 |
besides arrays. (Boris Zentner) |
| 816 |
|
| 817 |
2.00 Sat Mar 22 2003 |
| 818 |
- Bug Fix: Fixed bug where all code references were treated as if the were |
| 819 |
using the 'multiple constraints' feature. This bug was likely introduced |
| 820 |
in 1.93 (Chris Spiegel) |
| 821 |
- Bug Fix: Fixed bug which caused a failllure when using some sides of |
| 822 |
subroutine constraints within the "multiple constraints" syntax. |
| 823 |
(Chris Spiegal} |
| 824 |
|
| 825 |
1.93 Sun Mar 09 2003 |
| 826 |
- New Feature: Keys with multiple values are now supported |
| 827 |
- New Feature: A CGI.pm object can now be used to provide the input data |
| 828 |
- Bug Fix: pattern matching is faster in some cases now by not using $& |
| 829 |
(Tony Stubblebine) |
| 830 |
- Bug Fix: better support for using valid_* packages imported from other |
| 831 |
packages. (Alexander Solovey) |
| 832 |
- added link to demo site in documentation |
| 833 |
- fixed typo in documentation example (Kato Atsushi) |
| 834 |
- added link to Japanese translatation of the documents (Kato Atsushi) |
| 835 |
|
| 836 |
1.92 Sun Dec 22 2002 |
| 837 |
- support for untainting data (Tony Stubblebine) |
| 838 |
- documentation typo fixes (Charlie Garrison) |
| 839 |
- validator_packages added to profile specification |
| 840 |
allowing import of validation routine from other packages (Jeremy Muhlich) |
| 841 |
- support for multiple constraints per field added (Jeremy Muhlich) |
| 842 |
- support for literal values in constraint param field (Jeremy Muhlich) |
| 843 |
|
| 844 |
1.91 Sun Oct 05 2002 |
| 845 |
- Added feature to require some fields in a group. (Brad Smithart) |
| 846 |
- Bumped version to be greater than 1.9 to make CPAN.pm fetching work again |
| 847 |
|
| 848 |
1.11 Sat Jun 29 2002 |
| 849 |
- Fixed small bug where constraint arrays were tested with truth rather than length. (Maurice Aubrey) |
| 850 |
- Fixed documentation bug for american_phone validation (Dan Puro) |
| 851 |
- Added documentation for simplified syntax using a class method |
| 852 |
- Added profile syntax checking to help catch misspelled keys faster |
| 853 |
|
| 854 |
1.10 Sun Apr 21 2002 |
| 855 |
- Added code for field_filter_regexp_map (Tim Noll) |
| 856 |
|
| 857 |
1.9 Sun Feb 17 2002 |
| 858 |
- Fixed bug introduced in 1.8 which caused missing optional fields to |
| 859 |
wrongly subjected to constraint checking |
| 860 |
|
| 861 |
1.8 Thu Feb 14 2002 |
| 862 |
- Added link to Data::FormValidator::Tutorial in SEE ALSO section |
| 863 |
- Added "missing_optional_valid" flag to profiles to allow missing |
| 864 |
optional fields to be considered valid |
| 865 |
|
| 866 |
1.7 Sat Nov 03 2001 |
| 867 |
- Fixed broken constraint_regexp_map implementation. If you |
| 868 |
followed the example syntax in the documentation your regular |
| 869 |
expression could have failed to match when it should have |
| 870 |
succeeded. This feature now works as advertised in the |
| 871 |
documentation. |
| 872 |
- Updated documentation to reflect new mailing list and public |
| 873 |
CVS server. |
| 874 |
|
| 875 |
1.6 Sun Sep 23 2001 |
| 876 |
- Fixed bug with undefined lists by using empty lists instead (Ronald Kimball) |
| 877 |
- added IP address validation routine (Juan Jose Natera Abreu) |
| 878 |
|
| 879 |
1.5.1 Wed Jul 18 2001 |
| 880 |
- Updated version number to circumvent CPAN issue. No code changes. |
| 881 |
|
| 882 |
1.5 Thu Jun 28 2001 |
| 883 |
- Added more flexible dependency system (Ade Olonoh) |
| 884 |
|
| 885 |
1.4 Fri Jun 22 2001 |
| 886 |
- Fixed bug with code references (T.J. Mather) |
| 887 |
|
| 888 |
1.3 Tue Jun 19 2001 |
| 889 |
- Now maintained by Mark Stosberg <[email protected]> |
| 890 |
- Added constraint_regexp_map, required_regexp, optional_regexp |
| 891 |
- filter functions are exported |
| 892 |
- Renamed to Data::FormValidator from HTML::FormValidator |
| 893 |
|
| 894 |
# arch-tag: Mark_Stosberg_<[email protected]>--2004-03-20_18:34:51 |