What's New With 2.0.0
Features
No more manual discovery of validators, automated registration and lookup process, cleaned lots of code on this one!
New Validator:
Accepted
- The field under validation must be yes, on, 1, or true. This is useful for validating "Terms of Service" acceptance.New Validator:
Alpha
- Only allows alphabetic charactersNew Validator:
RequiredUnless
with validation data as a struct literal{ anotherField:value, ... }
- The field under validation must be present and not empty unless theanotherfield
field is equal to the passedvalue
.New Validator:
RequiredIf
with validation data as a struct literal{ anotherField:value, ... }
- The field under validation must be present and not empty if theanotherfield
field is equal to the passedvalue
.Accelerated validation by removing type checks. ACF chokes on interface checks
Improvements
Consistency on all validators to ignore null or empty values except the
Required
validatorFormatting consistencies
Improve error messages to describe better validation
Get away from
evaluate()
instead useinvoke()
Compat & Bugs
Bugs
: Fixed lots of wrong type exceptionsCompat
: Remove ACF11 support
Last updated