Commit Graph

343 Commits

Author SHA1 Message Date
Carsten Brandt
be658f82bf release version 2.0.12 2017-06-05 16:33:41 +02:00
Paul Klimov
40e5702b6b Fixes #5108 DateValidator resets $timestampAttribute value on empty attribute (#14242)
* `yii\validators\DateValidator` now resets `$timestampAttribute` value on empty validated attribute value

* array-value test at `DateValidatorTest` restored
2017-06-05 11:50:02 +02:00
bscheshirwork
921147dca5 Fixes #14161, #14150: fixed primary table aliasing (include case manual set alias) in validators 2017-05-16 13:24:49 +03:00
Alexander Makarov
8a087c8537 #14150: Added {{ and }} to getTablesUsedInFrom() output 2017-05-12 15:55:37 +03:00
Alexander Makarov
d331b72be6 Merge branch 'master' into unique-validator-fix 2017-05-12 00:45:55 +03:00
Alexander Makarov
96382454b1 Additional refactoring as suggested by @dynasource 2017-05-10 13:08:29 +03:00
Alexander Makarov
9828bde1db Added escaping for column name 2017-05-10 12:04:54 +03:00
Carsten Brandt
5c72047426 Fixed ambiguous column name in SELECT in UniqueValidator
fixes #14042
2017-05-10 12:02:48 +03:00
Alexander Makarov
23cc4bf4fe Further changes for unique and exist validators
- Combined methods for getting names and aliases of from tables
- Normalized names and aliases
- Added MSSQL syntax
- Added support for spaces in aliases and table names
2017-05-10 00:35:40 +03:00
Kolyunya
4a17032717 Fix validators documentation 2017-04-27 21:50:51 +03:00
Alexander Makarov
37fc6c5afb Alternative names 2017-04-26 15:36:36 +03:00
Paul Klimov
3598f8180c Fixes #13087: Fixed getting active validators for safe attribute 2017-04-26 02:29:10 +03:00
Alexander Makarov
99a0289221 Applied disambiguation to ExistValidator as well 2017-04-26 01:52:57 +03:00
Alexander Makarov
cf7f358093 Removed obsolete import 2017-04-25 23:30:53 +03:00
Alexander Makarov
7db93fc33d Refactored solution to be contained within ActiveQuery instead of helper 2017-04-25 23:24:27 +03:00
vladis84
8474927a55 Fixed ambiguous error sql while using unique validator 2017-04-25 23:24:12 +03:00
Mikk Tendermann
59d3292399 [IpValidator] disable ipv6 checks (#13984)
* disable ipv6 checks

* remove empty line

* updated CHANGELOG.md
2017-04-18 19:06:31 +03:00
Carsten Brandt
5bbf372f85 cleanup some phpdoc 2017-04-04 10:33:30 +02:00
Kolyunya
4eed7fb3da Fixes #13901: Fixed passing unused parameter to formatMessage() call in \yii\validators\IpValidator 2017-04-02 22:18:06 +03:00
Гордиенко Владислав Юрьевич
cd64fb2dc6 Refactored BooleanValidator (#13791) 2017-03-17 01:59:11 +03:00
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
Sam
06967f9018 Fixes #13254: Core validators no longer require Yii::$app to be set 2017-03-14 15:37:54 +03:00
gagatust
6397791513 Fixed whitespaces to match code style [skip ci] 2017-03-14 09:42:13 +03:00
Alexander Makarov
3536c7c4f9 Additional fixes for #13087 2017-02-22 23:15:40 +03:00
Vladimir Reznichenko
a182ce57fc Fixes for issues found with Static Code Analysis with Php Inspections (EA Extended) (#13606)
* Php Inspections (EA Extended): language level migration fixes
* Php Inspections (EA Extended): instanceof a trait always return false
* Php Inspections (EA Extended): fixed preg_quote (/ is not escaped by default)
* Php Inspections (EA Extended): fixed a greedy regex
* Php Inspections (EA Extended): refereted instanceof self in a trait
* Php Inspections (EA Extended): revert language level changes in requirements checker
* Php Inspections (EA Extended): revert language level changes in requirements checker
* Php Inspections (EA Extended): more greedy regexes fixed
2017-02-22 17:07:52 +03:00
Elvira Sheina
2de18cf9a5 Fixes #13087: Fixed getting active validators for safe attribute 2017-02-22 17:06:19 +03:00
Nikolay Oleynikov
53d824167c Fix a typo in a comment section (#13569) 2017-02-14 10:50:39 +01:00
Elvira Sheina
1ee91fe4ab Fix BC in Exist Validator (#13533)
Related to #13318 and #13475

fixes #13533
close #13534
2017-02-08 09:13:40 +01:00
Carsten Brandt
36521c50e0 instructions on signing tag on release repo 2017-02-02 14:35:16 +01:00
Carsten Brandt
c19b2f7dc8 release version 2.0.11 2017-02-01 17:46:29 +01:00
Carsten Brandt
1eec5c17bc make UniqueValidator compatible with ActiveRecordInterface again
fixes #13485
2017-02-01 13:30:19 +01:00
Elvira Sheina
0df8020dd0 Fix for #13485 2017-02-01 13:20:32 +01:00
Elvira Sheina
d39c491022 Fix BC breaking #13475 (#13478) 2017-01-31 11:56:46 +03:00
Elvira Sheina
240bca515a Use low-level query in UniqueValidator (#13461)
Fixes #13453, relates to #13098
2017-01-28 18:38:06 +03:00
Alexander Makarov
bede9feba5 Fixes #13453: Reverted #10896 commit 729ddc5b76
It was causing side effects: https://github.com/yiisoft/yii2/issues/13453
2017-01-28 01:16:14 +03:00
Alexander Makarov
3f4771b1de Phpdoc adjustments [skip ci] 2017-01-23 12:42:35 +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
3f66f1907f Removed unused method 2017-01-16 00:08:28 +03:00
Alexander Makarov
ebe30bd5ee Exposed number normalization as StringHelper::normalizeNumber() 2017-01-15 22:46:25 +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
e13a18ba8b added missing version information
fixes #13259
2016-12-20 22:40:44 +01:00
Alexander Makarov
a7f0a3c147 Merge branch 'master' into fix-numbervalidator-comma-decimal-separator 2016-12-17 16:39:00 +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
Nikola Kovacs
f5beaf3edf Make validator getClientOptions public
This allows implementing custom client-side validation
without extending every validator.

Fixes #11163
close #13145
2016-12-08 01:30:36 +01:00
Alexey Rogachev
76e253e140 yii\validators\Validator - added separate methods for client-side validation options
Closes #11163
2016-12-05 22:33:49 +02:00
Alexander Makarov
242d850d6c Shorter variable name, different approach to casting 2016-12-02 00:40:10 +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