Commit Graph

75 Commits

Author SHA1 Message Date
vladis84
3c1f3e20cf Fixes #13704: Fixed yii\validators\UniqueValidator to prefix attribute name with model's database table name 2017-03-16 17:42:31 +03:00
Alexander Makarov
3f8e8a89eb Used more specific unit test assertions in framework tests 2017-03-14 09:45:31 +03:00
gagatust
6397791513 Fixed whitespaces to match code style [skip ci] 2017-03-14 09:42:13 +03:00
Kolyunya
f9041646dd Improve string validator test coverage 2017-03-05 14:27:13 +03:00
Elvira Sheina
2de18cf9a5 Fixes #13087: Fixed getting active validators for safe attribute 2017-02-22 17:06:19 +03:00
SilverFire - Dmitry Naumenko
b4c7aaa5e0 Added more examples to EmailValidatorTest
Closes #9201
Closes #9067
2017-02-21 23:58:34 +02:00
Carsten Brandt
fba4e43469 added failing test for #13533
issue #13533
PR #13534
2017-02-08 09:10:19 +01:00
Elvira Sheina
d39c491022 Fix BC breaking #13475 (#13478) 2017-01-31 11:56:46 +03:00
Elvira Sheina
b82caa97e8 Fixes #7820: Add or relation for targetAttribute in yii\validators\UniqueValidator 2017-01-22 19:45:18 +03:00
Alexander Makarov
eee7b9663c Merge branch 'master' into fix-numbervalidator-comma-decimal-separator 2017-01-15 22:41:09 +03:00
Klimov Paul
d4ac47abe7 Added yii\validators\EachValidator::$stopOnFirstError allowing addition of more than one error 2017-01-13 17:59:10 +02:00
Carsten Brandt
96ee5c373e added more tests for SwiftMailer vulnerability CVE-2016-10074
https://legalhackers.com/advisories/SwiftMailer-Exploit-Remote-Code-Exec-CVE-2016-10074-Vuln.html
2016-12-28 23:50:10 +01:00
SilverFire - Dmitry Naumenko
6af2a43390 Added EmailValidatorTest to prove CVE-2016-10074 does not affect EmailValidator 2016-12-29 00:21:23 +02:00
Klimov Paul
194577c55e Code style fix 2016-12-26 15:39:33 +02:00
Alexander Makarov
a7f0a3c147 Merge branch 'master' into fix-numbervalidator-comma-decimal-separator 2016-12-17 16:39:00 +03:00
Robert Korulczyk
08054bba6d Fix tests. (#13227) 2016-12-17 16:37:31 +03:00
Elvira Sheina
bfba0aa711 Refactor validateAttribute method in UniqueValidator (#13202)
* Refactor validateAttribute method in UniqueValidator

Extract prepareParams and prepareQuery from validateAttribute,
so they can be tested separately.

* Added issue number to changelog

* Eliminated unneeded variable

* Renamed methods and parameters, update PHPDocs
2016-12-15 12:23:16 +01:00
SilverFire - Dmitry Naumenko
a132ee9a08 Fixed order or checks in IpValidator
Fixes #13198
2016-12-13 18:14:04 +02:00
Alexey Rogachev
bd85b7ced2 Closes #6242: Access to validator in inline validation (#13027)
* Closes #6242: Access to validator in inline validation

* Updated PHPDoc according to PR review [skip ci]

* Imrpoved PHPDoc, updated guide info [skip ci]

* Fixes related with PR review

* Corrected CHANGELOG [skip ci]

* Update input-validation.md

added version info
2016-12-08 23:29:53 +01:00
Alexander Makarov
a056281fa0 Attempt to make tests pass on travis environment 2016-12-04 00:58:40 +03:00
Alexander Makarov
b17dfa03a2 Fixes #10488: Fixed incorrect behavior of yii\validation\NumberValidator when used with locales where decimal separator is comma 2016-12-02 00:04:55 +03:00
Vladimir Khramov
dd94ead358 Initial work on #10488 2016-12-02 00:01:51 +03:00
yamaha252
22b2a78a0a Added test for unique validator with empty values
close #7007
2016-11-27 02:37:12 +01:00
SilverFire - Dmitry Naumenko
25ebf03a8d Fixed ValidatorTest::testValidateWithEmpty()
Closes #12848
2016-11-12 16:20:41 +02:00
Robert Korulczyk
4aa935e69e Fixes #12055: Changed boolean to bool and integer to int in phpdoc 2016-11-07 02:51:39 +03:00
Robert Korulczyk
4fdfbc2739 Add tests for custom message for UniqueValidator 2016-08-24 22:59:58 +02:00
Carsten Brandt
d2dd232b6f message improvement and test for #11323 2016-07-06 14:27:50 +02:00
Sam Mousa
b30b5a99ea Fixes #11672: Fixed yii\validators\NumberValidator erroring when value is an object without __toString() method 2016-06-23 23:32:25 +03:00
Carsten Brandt
86f17c8dad added tests classes for db related tests 2016-06-20 23:07:07 +02:00
Sergey Smirnov
1ed6fc09f6 #10825 Fixed EachValidator does not respect skipOnEmpty when using model (#11507) 2016-05-11 14:11:32 +02:00
Carsten Brandt
00d506c398 completed implementation for #7177
added TYPE_TIME and default values for format to be chosen from
corresponding formatter variable

fixes #7177
close #10778
2016-04-26 21:56:40 +02:00
Robbert Jan
bb0ef88860 Enhancement for DateValidator (#7177, #10165)
Added parameter to define if checking for 'date' or 'dateTime'
and updated parseDateValueIntl($value, $format) to facilitate
this validation based on defined type.

Added unit tests to for validating dateTime values when using short format validation.

close #10778
2016-04-26 19:22:41 +02:00
Klimov Paul
2d5a0bf5ae EachValidator::validateAttribute() fixed to restore original value on error 2016-04-12 12:00:33 +03:00
Klimov Paul
205f16811a Fixed yii\validators\EachValidator does not invoke validateAttribute() method of the embedded validator 2016-04-12 11:14:57 +03:00
Alexander Makarov
f312163258 Fixes #11220: NumberValidator now handles objects properly 2016-04-06 00:53:10 +03:00
githubjeka
8e1ec62191 update BooleanValidator 2016-03-29 16:38:17 +03:00
Dmitry Naumenko
d85e0eb80d Merge pull request #11150 from yiisoft/11139-each-validator-attribute-value
EachValidator injects specific attribute value in error message
2016-03-21 12:35:43 +02:00
LAV45
6c2545c807 Added SVG image and SVG mimeType test to FileValidatorTest 2016-03-21 08:34:24 +02:00
SilverFire - Dmitry Naumenko
a0f9bf2893 Fixed yii\web\UploadedFile::getBaseName() to be multibyte-safe, added test 2016-03-20 23:45:08 +02:00
SilverFire - Dmitry Naumenko
a0e614eb20 yii\validators\EachValidator injects specific attribute value in error message parameters
Closes #11139
2016-03-20 16:34:42 +02:00
Klimov Paul
779b1e90ce yii\validators\DateValidator skip validation for timestampAttribute, if it is already in correct format 2016-02-26 15:02:22 +02:00
SilverFire - Dmitry Naumenko
66c6268e5f FileValidator: updated guide-ru,en, PHP; updated tests 2016-02-24 09:05:29 +02:00
kirSeNN
a4c68b5278 #5469 added mimetype mask validation feature 2016-02-24 00:40:34 +02:00
Klimov Paul
d22a3a0a07 Fixed yii\validators\EachValidator does not respect skipOnEmpty rule parameter 2016-02-12 13:33:36 +02:00
SilverFire - Dmitry Naumenko
d12af259e0 Fixed UrlValidator pattern to improve matching 2016-02-05 14:47:12 +02:00
SilverFire - Dmitry Naumenko
08ce8c0718 EmailValidatorTest - spelling typo fixed 2016-02-02 09:22:15 +02:00
SilverFire - Dmitry Naumenko
4c31c26628 EmailValidator - the name of the mailbox is no longer limited with the length 2016-02-01 23:49:51 +02:00
Alexander Makarov
c79ebf49f4 Merge pull request #10639 from githubjeka/test-uniqvalid
UniqueValidatorTest: Added test for check the invalid attribute
2016-01-22 03:14:28 +03:00
githubjeka
dabbb81e07 Added test for check the invalid attribute 2016-01-21 21:23:51 +03:00
githubjeka
3ebe092828 Reproduce bug 2016-01-21 19:35:38 +03:00