Skip to content

Releases: vlucas/valitron

Various fixes

23 Oct 18:13
Compare
Choose a tag to compare
  • updated translations for pt-br, it and fr
  • less blowing up of php when an array is passed to a rule that expects a string
  • don't add {field} to a custom error message if it already exists
  • added a flag to force the required rule on empty fields

v1.4.0: Merge pull request #187 from notona/feature/fix-interger-validation

27 Feb 14:34
Compare
Choose a tag to compare

Validator::mapFieldRules() provides another way of adding rules on a per-field basis

Added a flag to validateInteger() to enable strict checking (bypassing PHP's automatic conversions)

Bugfix

09 Dec 11:11
Compare
Choose a tag to compare
  • Fixed a bug where Validator::withData would erase all rules.
  • Added test to make sure Validator::withData actually works as intended
  • Added "Re-use of validation rules" to the readme

Massive thanks to @wenbinye for spotting the bug, and sorry for any inconvenience it may have caused

v1.3.0

02 Dec 22:12
Compare
Choose a tag to compare

General:

  • Validator::rule now supports any kind of callable
  • Validator objects are re-usable for different data

Languages:

  • Norwegian
  • Slovak

Rules:

  • New 'between' rule: Validate the value of a field is between min and max values
  • Updated 'contains' rule: case-sensitivity can now be toggled using a parameter (defaults to case-sensitive)

Thanks to @willemwollebrants for his work on issues and PRs to get this release out.

v1.2.5

16 Mar 12:46
Compare
Choose a tag to compare

Updated:

  • validateAccepted() now also accepts string '1' as valid

New functionality:

  • "optional" rule: Value does not need to be included in data array. If it is however, it must pass validation.
  • callback rules: use custom callbacks or closures

New languages:

  • Dutch, Turkish, Azerbaijani

Updated language:

  • Portugese (Brazil)