Skip to content

Releases: yiisoft/validator

Version 2.5.1

12 Dec 14:36
Immutable release. Only release title and notes can be modified.
2.5.1
0679b3d

Choose a tag to compare

  • Enh #784: Add PHP 8.5 support (@vjik)
  • Bug #776: Take PropertyTranslatorProviderInterface into account during context validation (@vjik)
  • Bug #783: Fix error on uninitialized properties validation (@batyrmastyr)

Full changelog

Version 2.5.0

19 Jul 13:22
2.5.0
c726924

Choose a tag to compare

  • New #774: Add Result::getPropertyErrorMessagesByPath() method (@vjik)

Version 2.4.0

07 Jul 06:49
2.4.0
990d89e

Choose a tag to compare

  • Enh #770: Allow use callable rules into Nested (@Enjoyzz)
  • Enh #772: Adapt summary data in debug collector (@rustamwin)
  • Enh #773: Support stringable objects as validation error messages (@vjik)
  • Bug #750: Fix WhenMissing not working in nested rules (@Enjoyzz)
  • Bug #751: Fix incorrect Nested rule processing within Each (@Enjoyzz)

Version 2.3.0

07 May 12:04
2.3.0
2749e37

Choose a tag to compare

Version 2.2.0

16 Feb 08:50
2.2.0
f341ef5

Choose a tag to compare

  • New #762: Add stopOnError parameter to Each rule (@vjik)
  • Chg #761: Change PHP constraint in composer.json to ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 (@vjik)
  • Chg #761: Bump yiisoft/strings version to ^2.6 (@vjik)
  • Enh #758: Minor refactoring with PHP 8.1 features usage (@vjik)
  • Bug #748: Fix hook processing for nested objects that implement PostValidationHookInterface when Nested rule with
    specified rules is used (@DAGpro)
  • Bug #756: Fix russian translation of error message for FilledAtLeast rule (@vjik)
  • Bug #760: Fix bug in Email rule in edge case when enabled IDN, check DNS and used custom pattern (@vjik)
  • Bug #761: Fix URL handler for PHP 8.4 when value is empty string (@vjik)

Version 2.1.0

12 Sep 12:10
2.1.0
9e8ad99

Choose a tag to compare

  • Chg #747: Merge rules from PHP attributes with rules provided via getRules() method (@vjik)
  • Enh #740: Use Yiisoft\NetworkUtilities\IpRanges in Ip rule: add getIpRanges() method and deprecate
    getRanges(), getNetworks(), isAllowed() methods (@vjik)
  • Enh #746: Use NEGATION_CHARACTER constant from network-utilities package in IpHandler instead of declaring its own
    constant (@arogachev)

Version 2.0.0

02 Aug 07:19
2.0.0
1682f84

Choose a tag to compare

  • New #615: Add the Each::PARAMETER_EACH_KEY validation context parameter that available during Each rule handling
    and containing the current key (@dood-)
  • New #630, #718: Include attribute name in error messages when it's present (@dood-, @arogachev)
  • New #633: Add PHP attribute that sets property label for usage in error messages (@dood-)
  • New #734: Add InEnum rule (@samdark)
  • Chg #583: Change "attribute" to "property" in class/trait/method/variable/placeholder names (@vjik)
  • Chg #613: Change type of $escape argument in Error::getValuePath() from bool|string|null to string|null
    (@arogachev)
  • Chg #623: List translated attributes in error message for OneOf and AtLeast rules (@arogachev)
  • Chg #624: Fix meaning of error message in OneOf rule (@arogachev)
  • Chg #625: Improve meaning and use pluralization in error message for OneOf and AtLeast rules (@arogachev)
  • Chg #626: Disallow $min greater than amount of $attributes in AtLeast configuration (@arogachev)
  • Chg #634: Move getName() method from RuleInterface to RuleWithOptionsInterface (@arogachev)
  • Chg #634: Rename RuleWithOptionsInterface to DumpedRuleInterface (@arogachev)
  • Chg #634: Use FQCN as a name for built-in rules during export with RulesDumper (@arogachev)
  • Chg #634: Use FQCN as a name for rules not implementing DumpedRuleInterface during export with RulesDumper
    (@arogachev)
  • Chg #660: Change type of $skipOnEmpty argument in rules' constructors from mixed to bool|callable|null
    (@arogachev)
  • Chg #679: Change type of $rule argument in RuleHandlerInterface::validate() from object to RuleInterface
    (@arogachev)
  • Chg #694: Rename AtLeast rule to FilledAtLeast and OneOf rule to FilledOnlyOneOf (@arogachev)
  • Enh #492: Add type to error messages related with incorrect input (@arogachev)
  • Enh #622: Use json_validate() built-in PHP function in JsonHandler if code is run with PHP 8.3 (@arogachev)
  • Enh #636: Improve psalm annotations in Result class (@vjik)
  • Enh #637: Add German translation (@took)
  • Enh #639: Simplify validation of JSON in JsonHandler using built-in PHP functions for PHP versions below 8.3
    (@arogachev)
  • Enh #648: Raise the minimum version of PHP to 8.1 (@pamparam83)
  • Enh #726: Refactor Result::add(): took array_merge() out of the foreach (@lav45)
  • Enh #733: Make parameter $rules in RulesNormalizer::normalize() optional (@vjik)
  • Enh #735: Make Json::$message a bit more clear (@arogachev)
  • Bug #632: Fix property name usage in error messages of rules in Nested rule (@vjik)
  • Bug #733: Rules provided by data object PHP attributes were not used in RulesNormalizer::normalize() (@vjik)
  • Bug #736: Fix wrong value for type parameter for Each::$incorrectInputKeyMessage (@arogachev)

Version 1.4.1

11 Jun 12:32
1.4.1
7185b20

Choose a tag to compare

  • Bug #719: Fix parameters leak in context validation (@vjik)

Version 1.4.0

22 May 13:31
1.4.0
f0f80b4

Choose a tag to compare

  • New #649: Add getFirstErrorMessagesIndexedByPath() and getFirstErrorMessagesIndexedByAttribute() methods to
    Result (@arogachev)
  • New #655: Add rules for validating value types - boolean, float, integer, string (@arogachev)
  • New #657: Add Result::add() method for merging other results to the base one (@arogachev)
  • New #687: Add UniqueIterable rule (@arogachev)
  • New #693: Add AnyRule rule (@arogachev)

Version 1.3.0

04 Apr 11:45
1.3.0
ab93549

Choose a tag to compare

  • New #665: Add methods addErrorWithFormatOnly() and addErrorWithoutPostProcessing() to Result object (@vjik)
  • New #670, #677, #680: Add Image validation rule (@vjik, @arogachev)
  • New #678: Add Date, DateTime and Time validation rules (@vjik)
  • Enh #668: Clarify psalm types in Result (@vjik)