Yii Validator 2.0
2024-08-02
997次浏览
Major version of Yii Validator were tagged.
- Add the
Each::PARAMETER_EACH_KEYvalidation context parameter that available duringEachrule handling and containing the current key - Include attribute name in error messages when it's present
- Add PHP attribute that sets property label for usage in error messages
- Add
InEnumrule - Change "attribute" to "property" in class/trait/method/variable/placeholder names
- Change type of
$escapeargument inError::getValuePath()frombool|string|nulltostring|null - List translated attributes in error message for
OneOfandAtLeastrules - Fix meaning of error message in
OneOfrule - Improve meaning and use pluralization in error message for
OneOfandAtLeastrules - Disallow
$mingreater than amount of$attributesinAtLeastconfiguration - Move
getName()method fromRuleInterfacetoRuleWithOptionsInterface - Rename
RuleWithOptionsInterfacetoDumpedRuleInterface - Use FQCN as a name for built-in rules during export with
RulesDumper - Use FQCN as a name for rules not implementing
DumpedRuleInterfaceduring export with RulesDumper - Change type of
$skipOnEmptyargument in rules' constructors frommixedtobool|callable|null - Change type of
$ruleargument inRuleHandlerInterface::validate()fromobjecttoRuleInterface - Rename
AtLeastrule toFilledAtLeastandOneOfrule toFilledOnlyOneOf - Add type to error messages related with incorrect input
- Use
json_validate()built-in PHP function inJsonHandlerif code is run with PHP 8.3 - Improve psalm annotations in
Resultclass - Add German translation
- Simplify validation of JSON in
JsonHandlerusing built-in PHP functions for PHP versions below 8.3 - Raise the minimum version of PHP to 8.1
- Refactor
Result::add(): tookarray_merge()out of theforeach - Make parameter
$rulesinRulesNormalizer::normalize()optional - Make
Json::$messagea bit more clear - Fix property name usage in error messages of rules in
Nestedrule - Rules provided by data object PHP attributes were not used in
RulesNormalizer::normalize() - Fix wrong value for type parameter for
Each::$incorrectInputKeyMessage
See upgrading instructions with notes about upgrading package in your application to this major version.
新闻归档
热门标签
- yii3
- 扩展
- 发布
- yii2
- debug
- view
- auth client
- html
- bootstrap
- release
- mongodb
- redis
- apidoc
- Yii 1.1
- validation
- Yii 2.0
- http
- runner
- extensions
- console
- error handler
- gii
- mailer
- cache
- http 客户端
- queue
- twig
- hydrator
- translator
- widget
- sphinx
- router
- log
- symfonymailer
- assets
- config
- db
- swagger
- middleware
- imagine
- elasticsearch
- 图书
- swiftmailer
- widgets
- definitions
- i18n
- IDE
- fastroute
- csrf
- user