Blog

cbValidation 2.x Released

Luis Majano February 13, 2020

Spread the word

Luis Majano

February 13, 2020

Spread the word


Share your thoughts

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 : Added constraintProfiles to allow you to define which fields to validate according to defined profiles: https://github.com/coldbox-modules/cbvalidation/issues/37
  • feature : Updated RequiredUnless and RequiredIf to use struct literal notation instead of the weird parsing we did.
  • feature : Added the Unique validator thanks to @elpete!
  • improvement : Added null support for the RequiredIf,RequiredUnless validator 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: RequiredUnless with validation data as a struct literal { anotherField:value, ... } - The field under validation must be present and not empty unless the anotherfield field is equal to the passed value.
  • New Validator: RequiredIf with validation data as a struct literal { anotherField:value, ... } - The field under validation must be present and not empty if the anotherfield field is equal to the passed value.
  • 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 validator
  • Formatting consistencies
  • Improve error messages to describe better validation
  • Get away from evaluate() instead use invoke()

Compat & Bugs

  • Bugs : Fixed lots of wrong type exceptions
  • Compat : Remove ACF11 support

Add Your Comment

Recent Entries

ColdBox 7.2.0 Released

ColdBox 7.2.0 Released

ColdBox, a widely used development platform for ColdFusion (CFML), has unveiled version 7.2. Packed with compelling new features, bug fixes, and enhancements, this release is designed to empower developers by boosting productivity, refining scheduled task capabilities, and enhancing the overall reliability and efficiency of application development. This article will delve into the key highlights of ColdBox 7.2 and elucidate how these advancements can positively impact developers in their daily coding endeavors.

Luis Majano
Luis Majano
November 20, 2023
Into the Box 2023 Series on CFCast

Into the Box 2023 Series on CFCast

Excitement is in the air as we unleash the highly anticipated ITB 2023 series exclusively for our valued CFCast subscribers – and the best part? It's FREE for CFCast members! Now is the perfect time if you haven't joined the CFCast community yet. Plus, we've got an incredible End-of-Year deal that's too good to miss

Maria Jose Herrera
Maria Jose Herrera
November 20, 2023
Ortus Deals are Finally Here!

Ortus Deals are Finally Here!

The much-anticipated Ortus End-of-the-Year Sale has arrived, and it's time to elevate your development experience! Whether you're a seasoned developer, a tech enthusiast, or someone on the lookout for top-notch projects, Ortus has something special in store for you. Brace yourself for incredible discounts across a wide array of products and services, including Ortus annual events, books, cutting-edge services, and more.

Maria Jose Herrera
Maria Jose Herrera
November 15, 2023