456 Commits

Author SHA1 Message Date
8b50a4942a Fix @var tags syntax in framework folder (#20392) 2025-06-03 19:57:08 +03:00
0d0f77529a Fix #20231: Fix regression introduced in #20167 in yii\validators\FileValidator 2024-07-26 19:06:32 +03:00
52e4a3e645 release version 2.0.50 2024-05-30 20:23:31 +03:00
e92466bbba Fix #19855: Fixed yii\validators\FileValidator to not limit some of its rules only to array attribute 2024-05-30 14:36:12 +03:00
e2a167028b Upgrade to PSR12 coding standard (#20121) 2024-03-19 17:21:27 +03:00
581a7b2543 Fix #19735: Fix yii\validators\NumberValidator to use programmable message for the value validation 2023-01-13 10:57:03 +04:00
c55db9b305 Fix #19635: PHP 8.2 compatibility fix for yii\validators\DateValidator 2022-12-10 12:35:48 +03:00
68b473679a release version 2.0.47 2022-11-18 20:21:58 +04:00
3c6e66f2b3 Unique and Exist validators docs updated (#19678)
* Unique and Exist validators docs updated

* Correct the line in unique validator as well

Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
2022-11-16 08:32:27 +01:00
64afc3279a Revert "Fix #19668: Fix Error null check PHP 8.1 yii\validators\FilterValidator"
This reverts commit d056c7f209c3e14c36959225383b0ca4aaaf171f.
2022-11-15 11:46:11 +04:00
d056c7f209 Fix #19668: Fix Error null check PHP 8.1 yii\validators\FilterValidator 2022-11-15 09:27:42 +03:00
473ead8e46 Optimize: simplified regexp (#19541) 2022-09-06 09:42:58 +03:00
5358724251 Fix #12636: Fix CompareValidator successful state when compareAttribute has an error 2022-09-04 22:14:11 +03:00
22614a5b1f release version 2.0.46 2022-08-19 01:18:45 +03:00
161526cd41 HTTPS everywhere (#19503) 2022-08-03 12:32:18 +03:00
59f69fc9cd Fix #19462: Fix validator client options to encode HTML tags 2022-07-29 13:15:54 +03:00
009961963c Fix #19407: Fix yii\validators\UniqueValidator and yii\validators\ExistValidator to respect skipOnError option for target attributes 2022-07-29 09:47:33 +03:00
e234e48f3c Fix #19368: Fix PHP 8.1 error when $fileMimeType is null in yii\validators\FileValidator::validateMimeType() 2022-04-27 11:01:01 +03:00
06e5472753 Fix #19256: Pass missed $view to user's callback in yii\validators\InlineValidator::clientValidateAttribute() 2022-04-08 01:20:28 +04:00
a87c02c712 Fix more types (#19333)
* Migration::upsert() returns void

* Unneeded `@property` tags

* Add missing `null` param/return types

* Null types for db\Query + db\ActiveQuery

* Fixed testSelect

* Null types for Validator

* Several more null types

* One more

* Make AccessRule::$allow always a boolean

It doesn't have any special null handling, so it's safe to default to false

* Validator::$skipOnEmpty is always a boolean

* Catch all throwable from Widget::widget()

* Don't limit $previous args to \Exception

The actual \Exception allows $previous to be any throwable in PHP 7+

* Add Throwable catch block to Instance::get()

* Throwable cleanup

Comment changes only.

- Document \Throwable instead of \Exception wherever appropriate
- Removed redundant exception/error classes when \Throwable is referenced

* Yii::setlogger() accepts null

* ArrayHelper::removeValue() can remove any type of value

* Change default $allow value to false
2022-04-03 11:20:21 +02:00
4628b91e73 Fix types (#19332)
* Migration::upsert() returns void

* Unneeded `@property` tags

* Add missing `null` param/return types

* Null types for db\Query + db\ActiveQuery

* Fixed testSelect
2022-03-30 18:40:10 +02:00
2874e070f3 Fix #19322: Revert force setting value to empty string in case it's null in yii\validators\FilterValidator::validateAttribute() 2022-03-24 17:50:00 +04:00
7cc45f75f5 Add TrimValidator (#19304)
* Add TrimValidator

* Update Validator.php

* Update Validator.php

* Update TrimValidator.php

* Update TrimValidator.php

* Update TrimValidator.php

* Update TrimValidator.php

* Update CHANGELOG.md

* Update Validator.php
2022-03-22 11:16:47 +01:00
1271bc419f Fix #19041: Fix PHP 8.1 issues 2022-01-14 13:52:01 +03:00
655786b7ed release version 2.0.44 2021-12-30 10:50:56 +03:00
0041f034fd [doc] Update PHP doc links (#18957)
* Replace https://secure.php.net with https://www.php.net

* Replace http://www.php.net with https://www.php.net
2021-10-19 14:50:26 +02:00
3578621833 Shorten two identical statements in compare validator (#18922) 2021-10-01 23:37:54 +03:00
e3028c524d Fix #18899: Replace usages of strpos with strncmp and remove redundant usage of array_merge and array_values 2021-09-28 11:06:46 +03:00
b7943c6732 Fix #18823: Rollback changes #18806 in yii\validators\ExistValidator::checkTargetRelationExistence() 2021-08-15 16:15:14 +03:00
1474e2d61a Optimize yii\validators\ExistValidator
Optimize methods `valueExists()` and `checkTargetRelationExistence()`
2021-08-04 23:40:25 +03:00
be1b98b1df Fix #18756: Fix \yii\validators\ExistValidator::queryValueExists to validate against an array of unique values 2021-08-04 21:00:58 +03:00
725057c273 Fix #18734: Added yii\validators\EmailValidator::$enableLocalIDN 2021-07-06 01:55:02 +03:00
e1e7ea37d5 use getTargetClass in function checkTargetAttributeExistence
This interesting change, to be able to change getTargetClass when necessary when extending this class.
2021-06-15 13:07:53 -03:00
88a7a00458 release version 2.0.42 2021-05-06 00:08:29 +03:00
f00e44fb6e Fix #18569: Add NumberValidator::$allowArray 2021-04-26 15:43:13 +03:00
2f051bc441 Add Since PHPDoc 2021-04-07 21:55:25 +03:00
63cb61f591 Refactoring so regex has it's own variables 2021-04-06 07:49:57 -07:00
6659e6a187 Refactor based on suggestion 2021-04-01 16:27:59 -07:00
d02d60e070 Limiting explode to 2 2021-03-31 15:21:19 -07:00
808c64d900 Refactoring method per request 2021-03-31 15:15:46 -07:00
3593696b93 Fixing Email Validator to handle edge case where email address is valid but fails ascii conversion. 2021-03-31 11:50:24 -07:00
cfe782b3f5 Fix #18544: Fix yii\validators\NumberValidator to disallow values with whitespaces 2021-03-11 00:40:34 +03:00
b8e31c0d31 Fix #18460: compareValue in CompareValidator can now take a closure returning a value 2021-02-25 13:01:38 +03:00
8824ee7eed Fix typo in SafeValidator
assigment -> assignment
2020-12-21 15:15:48 +03:00
ccb14ff667 release version 2.0.39 2020-11-10 13:58:35 +03:00
840083724e Fix #18351: Added option to change default timezone for parsing formats without time part in yii\validators\DateValidator 2020-10-31 15:59:20 +03:00
f212925242 Fix #18239: Fix support of no-extension files for FileValidator::validateExtension() 2020-08-19 20:32:15 +03:00
1ade4993f9 Fix #18204: Fix 2.0.36 regression in inline validator and JS validation 2020-08-04 14:24:43 +03:00
dab7a6c317 Update phpdoc 2020-07-20 02:44:55 +03:00
d62590807d Fix #18051: Fix using EachValidator with custom validation function 2020-07-06 16:18:03 +03:00