We are so excited to bring you a major release for cbValidation! cbValidation has been around for quite some time and it was about time to give a major boost in development. We have also completely rewritten the documentation to make it more attractive and user-friendly (https://coldbox-validation.ortusbooks.com/). Enjoy!
# Install install cbvalidation # Update update cbvalidation
Release Notes
2.1.0
feature: AddedconstraintProfilesto allow you to define which fields to validate according to defined profiles: https://github.com/coldbox-modules/cbvalidation/issues/37feature: UpdatedRequiredUnlessandRequiredIfto use struct literal notation instead of the weird parsing we did.feature: Added theUniquevalidator thanks to @elpete!improvement: Addednullsupport for theRequiredIf,RequiredUnlessvalidator values
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 characters - New Validator:
RequiredUnlesswith validation data as a struct literal{ anotherField:value, ... }- The field under validation must be present and not empty unless theanotherfieldfield is equal to the passedvalue. - New Validator:
RequiredIfwith validation data as a struct literal{ anotherField:value, ... }- The field under validation must be present and not empty if theanotherfieldfield 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
Requiredvalidator - Formatting 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
Add Your Comment