Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Valitron Laravel Package

vlucas/valitron

Valitron is a lightweight, dependency-free PHP validation library with simple, readable rules. Validate arrays like $_POST in one call, get structured errors, and extend with custom rules and callbacks—minimal code, well tested, and framework-agnostic.

View on GitHub
Deep Wiki
Context7
v1.4.11
  • requireWith(out) now supports dot notation
  • translation fixes in various languages

Thank to all contributors!

v1.4.10
  • testing now runs as a github workflow
  • now also tested against PHP 8.0
  • improved handling of indexed/associative arrays
v1.4.9

Allow disabling of auto prepending the field labels

v1.4.8

Add support for SL language

v1.4.7

New rules requiredWith and requiredWithout for conditional requirements

v1.4.6

new rule listContains - Performs in_array check on given array values

v1.4.5

New rule arrayHasKeys

v1.4.4

Fixed a bug[#262] where array elements where considered required when any rule was applied to them New rules for dealing with arrays: subset and containsUnique Languages: new string in Lithuanian, Norwegian Bokmål added Additional documentation and comments

v1.4.3

New languages: Lithuanian, Swedish, Korean New option to stop validating when the first error is encountered Support for nested arrays for 'equals' and 'different' rules Enhanced tests

v1.4.2

The validateRequired method required $fields to be an array, and this broke compatibility with objects that implement PHP's ArrayAccess interface.

Please note that while ArrayAccess-objects will probably work most of the time, Valitron is meant to be used with actual arrays.

v1.4.1
  • 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

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)

v1.3.1
  • 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

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

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)
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor