Releases: h2lsoft/validator
Releases · h2lsoft/validator
Release list
v2.0.0
Validator v2.0 - Major rewrite with bug fixes, new rules, i18n
New validation rules:
- boolean(), password(), custom(), different(), reset()
- dateBefore(), dateAfter(), time(), timezone()
- ipV4(), ipV6(), json(), jsonArray(), jsonObject()
- country(), language(), currency()
- iban() (MOD-97 checksum), bic()
- uuid(), macAddress(), cssColor()
- csrfToken() with auto-regeneration on failure
- toJson() with auto Content-Type header
Bug fixes :
- notIn() $params not passed to addError()
- date()/datetime() missing $message param
- strlen → mb_strlen for multibyte support (alpha, alphaNumeric, length, minLength, maxLength, mask)
- integer()/float() filter_var() === false for proper zero handling
- date()/datetime() getLastErrors() returning false on PHP 8.2+
- Constructor return $this removed
- Double $error = false cleanup
Code quality:
- All private → protected for extensibility
- PHP 7.4+ typed properties, parameters and return types
- PHPDoc on all methods
- LATINS_CHARS: removed duplicates, added missing chars (ì, ò, õ, ã, œ, ý, ÿ)
- VERSION bumped to 2.0
i18n:
- Added locale files: es, pt, de, it (+ updated fr)
- All 70+ messages translated in 6 locales
Other:
- composer.json: require php >=7.4, ext-mbstring
- README.md: complete rewrite with all rules documented