What's New With 3.1.0
2021-MAY-15
[3.1.0] => 2021-MAY-15
Added
New validator:
ArrayItemwhich can validate an array's items and make sure all the items pass validation against a specific constraints schema.New validator:
DateEqualswhich can help you validate that a target value is a date and is the same date as the validation date or other fieldNew validator:
Afterwhich can help you validate that a target value is a date and is after the validation dateNew validator:
AfterOrEqualwhich can help you validate that a target value is a date and is after or equal the validation dateNew validator:
Beforewhich can help you validate that a target value is a date and is before the validation dateNew validator:
BeforeOrEqualwhich can help you validate that a target value is a date and is before or equal the validation dateNew
onError( closure ), onSuccess( closure )callbacks that can be used to validate results using thevalidate()method and concatenate the callbacks.New
assert()helper that can assit you in validating truthful expressions or throwing exceptionsTwo new helpers:
validateIsNullorEmpty()andvalidateHasValue()so you can do simple validations not only on objects and constraints.RequiredIf, RequiredUnlesscan now be declared with a simple value pointing to a field. Basically testing ifanotherFieldexists, or unlessanotherFieldexists.New
BaseValidatorfor usage by all validators to bring uniformity, global di, and helpers.
Changed
The
IValidatorremoves thegetName()since that comes from theBaseValidatornow.The
UniqueValidatornow supports both creation and update checks with new constraints.Removed hard interface requirements to avoid lots of issues across CFML engines. Moved them to the
interfacesfolder so we can continue to document them and use them without direct compilation.
Fixed
Metadata for arguments did not have the right spacing for tosn of validators.
Added the missing
rulesstruct argument to several validators that missed it.
Last updated
Was this helpful?