cuileon
489dd119a5
merge from yiisoft/yii2
6 years ago
bscheshirwork
68e5a9b315
Fix typo ( #16443 ) [skip ci]
6 years ago
SilverFire - Dmitry Naumenko
7bd694dccb
Enhanced tests
7 years ago
rossoneri
63ffae028e
Fixes #14254 : add an option to specify whether validator is forced to always use master DB for `yii\validators\UniqueValidator` and `yii\validators\ExistValidator`
7 years ago
Laszlo
0bec2b462c
Fixes #14484 : Fixed `yii\validators\UniqueValidator` for target classes with a default scope
7 years ago
Robert Korulczyk
5a8c3d537b
Enable `phpdoc_summary` rule in php-cs-fixer config ( #14675 )
...
* Enable `phpdoc_summary` rule in php-cs-fixer config.
* Fix case in "PHPDoc".
7 years ago
Alexander Makarov
d4c15c36d0
Fixes #14304 : Fixed `yii\validators\UniqueValidator` and `yii\validators\ExistValidator` to skip prefixes in case expressions are used
7 years ago
Robert Korulczyk
ba0ab403b5
Added php-cs-fixer coding standards validation to Travis CI ( #14100 )
...
* php-cs-fixer: PSR2 rule.
* php-cs-fixer: PSR2 rule - fix views.
* Travis setup refactoring.
* Add php-cs-fixer to travis cs tests.
* Fix tests on hhvm-3.12
* improve travis config
* composer update
* revert composer update
* improve travis config
* Fix CS.
* Extract config to separate classes.
* Extract config to separate classes.
* Add file header.
* Force short array syntax.
* binary_operator_spaces fixer
* Fix broken tests
* cast_spaces fixer
* concat_space fixer
* dir_constant fixer
* ereg_to_preg fixer
* function_typehint_space fixer
* hash_to_slash_comment fixer
* is_null fixer
* linebreak_after_opening_tag fixer
* lowercase_cast fixer
* magic_constant_casing fixer
* modernize_types_casting fixer
* native_function_casing fixer
* new_with_braces fixer
* no_alias_functions fixer
* no_blank_lines_after_class_opening fixer
* no_blank_lines_after_phpdoc fixer
* no_empty_comment fixer
* no_empty_phpdoc fixer
* no_empty_statement fixer
* no_extra_consecutive_blank_lines fixer
* no_leading_import_slash fixer
* no_leading_namespace_whitespace fixer
* no_mixed_echo_print fixer
* no_multiline_whitespace_around_double_arrow fixer
* no_multiline_whitespace_before_semicolons fixer
* no_php4_constructor fixer
* no_short_bool_cast fixer
* no_singleline_whitespace_before_semicolons fixer
* no_spaces_around_offset fixer
* no_trailing_comma_in_list_call fixer
* no_trailing_comma_in_singleline_array fixer
* no_unneeded_control_parentheses fixer
* no_unused_imports fixer
* no_useless_return fixer
* no_whitespace_before_comma_in_array fixer
* no_whitespace_in_blank_line fixer
* not_operator_with_successor_space fixer
* object_operator_without_whitespace fixer
* ordered_imports fixer
* php_unit_construct fixer
* php_unit_dedicate_assert fixer
* php_unit_fqcn_annotation fixer
* phpdoc_indent fixer
* phpdoc_no_access fixer
* phpdoc_no_empty_return fixer
* phpdoc_no_package fixer
* phpdoc_no_useless_inheritdoc fixer
* Fix broken tests
* phpdoc_return_self_reference fixer
* phpdoc_single_line_var_spacing fixer
* phpdoc_single_line_var_spacing fixer
* phpdoc_to_comment fixer
* phpdoc_trim fixer
* phpdoc_var_without_name fixer
* psr4 fixer
* self_accessor fixer
* short_scalar_cast fixer
* single_blank_line_before_namespace fixer
* single_quote fixer
* standardize_not_equals fixer
* ternary_operator_spaces fixer
* trailing_comma_in_multiline_array fixer
* trim_array_spaces fixer
* protected_to_private fixer
* unary_operator_spaces fixer
* whitespace_after_comma_in_array fixer
* `parent::setRules()` -> `$this->setRules()`
* blank_line_after_opening_tag fixer
* Update finder config.
* Revert changes for YiiRequirementChecker.
* Fix array formatting.
* Add missing import.
* Fix CS for new code merged from master.
* Fix some indentation issues.
7 years ago
Carsten Brandt
5c72047426
Fixed ambiguous column name in SELECT in UniqueValidator
...
fixes #14042
7 years ago
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
7 years ago
Carsten Brandt
d786b78f25
Helper independent ( #14050 )
...
* Made sure most helpers are independent of Yii::$app
* Made sure most validators are independent of Yii::$app
8 years ago
Klimov Paul
dee88787fc
compatibility with PHPUnit 6.x added
8 years ago
vladis84
3c1f3e20cf
Fixes #13704 : Fixed `yii\validators\UniqueValidator` to prefix attribute name with model's database table name
8 years ago
gagatust
6397791513
Fixed whitespaces to match code style [skip ci]
8 years ago
Elvira Sheina
d39c491022
Fix BC breaking #13475 ( #13478 )
8 years ago
Elvira Sheina
b82caa97e8
Fixes #7820 : Add `or` relation for `targetAttribute` in `yii\validators\UniqueValidator`
8 years ago
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
8 years ago
yamaha252
22b2a78a0a
Added test for unique validator with empty values
...
close #7007
8 years ago
Robert Korulczyk
4fdfbc2739
Add tests for custom message for `UniqueValidator`
8 years ago
Carsten Brandt
d2dd232b6f
message improvement and test for #11323
8 years ago
Carsten Brandt
86f17c8dad
added tests classes for db related tests
8 years ago
githubjeka
dabbb81e07
Added test for check the invalid attribute
9 years ago
githubjeka
3ebe092828
Reproduce bug
9 years ago
SilverFire - Dmitry Naumenko
6eb9830d64
UniqueValidatorTest, CHANGELOG - fixed spelling
9 years ago
githubjeka
a215013f68
Missing phpDoc properties has been added
9 years ago
githubjeka
0fc744598d
optimized imports & add phpDoc
9 years ago
githubjeka
fd6e33ccf3
Semantics of the test has been improved
9 years ago
githubjeka
e5e67ebed5
Add testValidateTargetClass for reproduce the bug.
...
When IDs targetClass & model(not new) is same then unique validator passed
9 years ago
╃巡洋艦㊣
586684b050
2.0.5 bf7edc5
9 years ago
Alexander Makarov
6949992246
Simplified tests directory structure a bit
10 years ago
╃巡洋艦㊣
1468bd4d3d
version 2.0.1 84b42ab
10 years ago
Carsten Brandt
83a63f2346
fixed wrong client validation issue in numbervalidator
...
fixes #3118
11 years ago
Qiang Xue
0e143338d7
Finished refactoring find() .
11 years ago
SonicGD
b5f8a4dc22
Reformat code te be PSR-2 compatible
11 years ago
Qiang Xue
9649a6727a
Renamed `attributeName` and `className` to `targetAttribute` and `targetClass` for `UniqueValidator` and `ExistValidator`.
...
Refactored UniqueValidator and ExistValidator.
11 years ago
Qiang Xue
252b6c9ef1
Fixes #797 : Added support for validating multiple columns by `UniqueValidator` and `ExistValidator`
11 years ago
Qiang Xue
bb6b75e794
fixed exception check in test.
11 years ago
Alexander Makarov
ee2af2661c
Removed unneeded use statements
11 years ago
Carsten Brandt
3631890cba
fixed failing validator tests
11 years ago
Alexander Makarov
1f6a823073
Short array syntax
11 years ago
Carsten Brandt
f974e1a59f
fixed validator test break
11 years ago
Alexander Makarov
8c1c3c59d9
Better AR connection init in tests
11 years ago
Suralc
06682d0ba9
coverage improvements
11 years ago
Suralc
c189e5ad3f
UniqueValidator test.
11 years ago