Commit graph

149 commits

Author SHA1 Message Date
vanquang9387
8b3bba3341 Reformat Validation class 2015-10-19 15:47:33 +07:00
vanquang9387
af8c992655 2.x uploadedFile validation (backported from #4524) 2015-10-19 15:15:28 +07:00
mark_story
b7c9ac913d Backport fixes for comparison() and range() to 2.x
These fixes were released as a security update for 3.x, they also belong
in 2.x
2015-08-06 21:36:39 -04:00
Mark Scherer
52e79987a2 Replacing self with static due to PHP5.3+. Following #7040. 2015-07-21 10:22:53 +02:00
mark_story
47378427e3 Merge branch '2.6' into 2.7 2015-07-11 21:25:26 -04:00
Marc Würth
4a131bdcbf Capitalize Windows, the OS 2015-07-09 15:54:03 +02:00
mark_story
26b3713bd6 Merge branch '2.7' of github.com:cakephp/cakephp into 2.7 2015-06-20 10:03:24 -04:00
mark_story
664ba53c89 Merge branch '2.6' into 2.7 2015-06-20 10:03:14 -04:00
Mark Scherer
4025f2fb22 add cast for clarification and to allow int 0. 2015-06-17 12:38:06 +02:00
Mark Scherer
1b81323462 Use strict check 2015-06-17 12:06:56 +02:00
Mark Scherer
86c358f3f9 Fix Validation::multiple() regarding 0 value. 2015-06-15 16:35:27 +02:00
Mark Scherer
2a5cbb8037 Add missing static keyword. 2015-05-31 13:40:22 +02:00
Mark Scherer
866242643f Deprecate notEmpty in favor of notBlank. 2015-05-17 22:13:04 +02:00
Ceeram
43e998422e Fix PHPCS errors 2014-10-10 16:52:01 +02:00
mark_story
2ee0827161 Fix PHPCS errors. 2014-10-01 20:34:33 -04:00
euromark
816e64bec8 Adjust wording. 2014-08-04 16:46:56 +02:00
euromark
bbcdf2404e Deprecate ssn() validation in favor of plugin Localized. 2014-08-04 16:39:43 +02:00
ADmad
713f430fc4 Merge branch 'master' into 2.6 2014-08-03 01:05:36 +05:30
euromark
b188d670b7 Make year range validation less strict by default. 2014-07-26 04:06:26 +02:00
mark_story
3a70d9c033 Merge branch 'master' into 2.6 2014-07-09 10:17:05 -04:00
mark_story
3936cce4b8 Disallow hexadecimal input with inList.
Instead of turning on/off strict mode based on the user supplied input,
cast everything to strings and always use a strict check. This avoids
the potential issue of a bad user using hexadecimal when they should not
be allowed to do so. Thanks to 'Kurita Takashi' for pointing this out.
2014-07-03 22:10:49 -04:00
ADmad
e410501791 Fix CS errors. 2014-07-03 23:13:55 +05:30
mark_story
2bcd817367 Merge branch 'master' into 2.6 2014-07-03 11:13:06 -04:00
euromark
974ca851c2 Correct doc blocks according to cs guidelines.
Remove superfluous empty lines.
2014-07-03 15:36:42 +02:00
mark_story
7e8d378502 Merge branch 'master' into 2.6 2014-05-29 21:46:16 -04:00
ADmad
7a4244d0a6 More docblock CS fixes. 2014-05-28 22:09:54 +05:30
Schlaefer
3ac731273e adds backwards compatible 'between' alias for 'lengthBetween' validation rule 2014-05-13 17:36:23 +02:00
Schlaefer
4848b63189 closes #3303 RFC: Rename Validator::between() into Validator::length() 2014-05-13 09:31:03 +02:00
mark_story
d54fbe6f60 Merge branch 'master' into 2.5 2014-04-18 22:13:56 -04:00
mark_story
d4ae2b0b88 Correct types for Validation::range().
Refs #3304
2014-04-13 06:16:24 -04:00
euromark
0ece694a75 microptimize options and default merge and other string key array merges 2014-04-08 01:25:14 +02:00
mark_story
0f584c0e8b Merge branch 'master' into 2.5 2014-02-24 21:19:17 -05:00
AD7six
4e0627232c account for localized floats more robustly.
Normalize floats, strings too, so that they are validated as

    dddddddddd.dd

ref #2853
2014-02-19 15:04:25 +00:00
mark_story
b8c94fa5d4 Merge branch 'master' into 2.5 2014-02-18 22:19:12 -05:00
mark_story
0a51458ffd Fix Validation::decimal() not working with localized floats.
Use similar workarounds as DboSource::value() for accepting localized
floats.

Fixes #2853
2014-02-18 22:18:56 -05:00
Mark Story
c325a93998 Merge pull request #2741 from ADmad/2.5-mimetype
Added regex support to Validation::mimeType().
2014-02-17 10:10:48 -05:00
ADmad
9ae7f11a2a Made mimetype check case insensitive. 2014-02-17 11:48:00 +05:30
mark_story
2c5d96e916 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Model/Datasource/DboSource.php
2014-02-16 14:24:19 -05:00
euromark
1725386c16 Fix uploadError validation rule to work with OS Win. Here the error is string, not integer. 2014-02-12 21:52:18 +01:00
ADmad
2d10707d18 Added regex support to Validation::mimeType(). 2014-01-30 21:05:04 +05:30
mark_story
7e5c0f7185 Merge branch 'master' into 2.5 2013-12-20 14:15:35 -05:00
mark_story
44b7d013ae Fix whitespace error. 2013-12-16 21:39:06 -05:00
mark_story
ef899f0c93 Make API docs easier to read. 2013-12-14 23:08:07 -05:00
mark_story
47497029bb Fix mixed tabs/spaces. 2013-12-14 23:03:34 -05:00
mark_story
e15d1652ed Relax the 'my' and 'ym' date validation formats.
All other formats that include 'y' allow 2006 or 06. These formats are
now conformant with the other formats available.

Closes #2436
2013-12-14 23:02:12 -05:00
mark_story
15c390586f Pull out some re-used subpatterns.
Having smaller segments makes reading the larger patterns simpler, and
allows for less duplication across the various patterns.

Refs #2436
2013-12-14 18:20:20 -05:00
ADmad
dda6080579 Merge branch 'master' into 2.5 2013-11-19 00:27:12 +05:30
Marc Würth
7cfa0116f4 Removed "PHP 5" from file header DocBlocks
This statement does not serve a purpose anymore.
In a long forgotten world it indicated the main version number of PHP which the code in the file was compatible to.
http://pear.php.net/manual/en/standards.sample.php
But since PHP 5.1 and later this is only marginally true.
Thus I propose to remove it from CakePHP.
2013-11-13 22:58:39 +01:00
mark_story
5a394c379a Merge branch 'master' into 2.5 2013-10-14 22:57:50 -04:00
euromark
ed2054f4f2 Allow international domains to pass validation. Fixes #1763 2013-10-13 23:43:29 +02:00