utopia-php/validators
A lightweight collection of reusable validators for Utopia projects
0.5.0
307K downloads/mo
#3554 most downloaded on Packagist
utopia-php/validators
What this package is like to depend on
Last release 9 days ago
14 Aug 2026
Release timing varies
gaps range from 1 weeks to 3 months
Some releases are documented
notes for 10 of 19 stable releases
Nothing withdrawn
no release was ever pulled
10 months old
19 releases · first in 2025
18 releases in the last 12 months
see the full history below
Release timeline
18 releases · Oct 2025 to Aug 2026Releases
latest 19-
0.5.014 Aug 2026Release notes
Open source →- validators: let Text require non-blank values
Changes: utopia-php/monorepo@validators/0.4.2...validators/0.5.0
-
0.4.211 Aug 2026Release notes
Open source →- fix(validators): reject trailing newline in Identifier
- style(validators): satisfy pint and rector on Identifier
- chore: change identifiers
- Merge remote-tracking branch 'origin/main' into feat/validators-identifier
- feat(validators): add Identifier validator
Changes: utopia-php/monorepo@validators/0.4.1...validators/0.4.2
Release notes
Open source →Added
- New
Identifiervalidator. ExtendsTextand additionally requires a C-style identifier (^[A-Za-z_][A-Za-z0-9_]*$): letters, digits and underscores only, not starting with a digit. This is the shape required of environment variable names and shell identifiers, so a value that passes a plain length check but contains a tab, a space or an accented letter is rejected. Accepts an optionalint $length(0 = unlimited); minimum length is 1.
-
0.4.110 Aug 2026Release notes
Open source →- No changes to this package since validators/0.4.0.
Changes: utopia-php/monorepo@validators/0.4.0...validators/0.4.1
-
0.4.007 Aug 2026Release notes
Open source →- feat(validators): add phone validator
Changes: utopia-php/monorepo@validators/0.3.2...validators/0.4.0
Release notes
Open source →Phone validator
Added
- New
Phonevalidator for E.164 phone number syntax. It validates values with a leading+followed by 7 to 15 digits, supports optional empty strings throughallowEmpty, and can opt in to URL/path recovery throughnormalize.
-
0.3.2no dateRelease notes
Open source →- feat(validators): add JSON object and array shape validators
- docs: centralize CODE_OF_CONDUCT and CONTRIBUTING at the monorepo root
- docs: enforce documentation style with Vale
Changes: utopia-php/monorepo@validators/0.3.1...validators/0.3.2
Release notes
Open source →JSON shape validators
Added
- New
JSON\ObjectValidatorandJSON\ArrayValidatorvalidators for JSON shape checks. Both accept decoded values or encoded JSON strings while preserving the distinction between objects and arrays.
-
0.3.114 Jul 2026Release notes
Open source →- chore(validators): align changelog heading to 0.3.1 release
- Improve valiator compatibility between params behaviour
- Support https enforcement on url validator
Changes: utopia-php/monorepo@validators/0.3.0...validators/0.3.1
Release notes
Open source →URL validator — OAuth2 secure-redirect transport policy
Added
- New optional constructor parameter
bool $httpsOrLoopback = false(kept last in the signature). When enabled, a standard (authority-bearing, non-private-use) URL is valid only if its scheme ishttpson any host, orhttpon a loopback host (localhost,127.0.0.1, or[::1]); every other standard scheme and any routablehttphost is rejected (RFC 8252 §7.3). Private-use scheme URIs (governed byallowPrivateUseSchemes) are exempt. The flag is self-contained and independent ofallowedSchemes— when both are set, a value must satisfy both.getDescription()reflects the restriction when the flag is on.
The change is backward compatible:
httpsOrLoopbackdefaults tofalse, so existing callers are unaffected, and the behavior ofallowedSchemesandallowPrivateUseSchemes(including howallowedSchemesrestricts which private-use schemes are accepted) is unchanged. -
0.3.013 Jul 2026Release notes
Open source →- chore(validators): conform package to PHP 8.5 rector/pint rule sets
- Use new URI class
- feat(url): support private-use URI scheme redirect URIs (RFC 8252)
- ci: pin root toolchain and fix package checks
- ci: redirect mirror issues
- ci: reuse mirror redirect workflow
Changes: utopia-php/monorepo@validators/0.2.8...validators/0.3.0
-
0.2.826 Jun 2026Release notes
Open source →- refactor: apply baseline rector to packages that lacked a config
- build: hoist baseline rector + phpstan configs to the root
Changes: utopia-php/monorepo@validators/0.2.7...validators/0.2.8
-
0.2.720 Jun 2026Release notes
Open source →- refactor(monorepo): simplify absorb/sync flows (-635 LoC)
- Pin all workflow actions to SHAs with ratchet, enforce in CI
Changes: utopia-php/monorepo@validators/0.2.6...validators/0.2.7
-
0.2.610 Jun 2026 -
0.2.510 Jun 2026Nothing published for this version
-
0.2.421 May 2026Nothing published for this version
-
0.2.314 May 2026Nothing published for this version
-
0.2.227 Apr 2026Nothing published for this version
-
0.2.127 Apr 2026Nothing published for this version
-
0.2.013 Jan 2026Nothing published for this version
-
0.1.018 Nov 2025Nothing published for this version
-
0.0.220 Oct 2025Nothing published for this version
-
0.0.120 Oct 2025Nothing published for this version