All tags / #validation

#validation

1 post

Validation conditions now fail closed: migrating your 2.x condition strings

Peter Amiri

Part 5 of "From 2.x to 4.x: the field guide". CFWheels 2.x ran validation condition= and unless= strings through Evaluate(); Wheels 4.1 parses a small grammar and throws Wheels.InvalidValidationCondition for what it can't parse. This post lists the grammar 4.1.2 accepts, runs ten 2.x-style strings on 4.1.2 (three throw, seven give the wrong answer without an error), rewrites each one, covers the this.method() escape hatch and the two production conditions from the 4.1.1 CHANGELOG, and explains what Wheels 4.2 changes.

Newsletter

Release notes and new posts, once a month. No spam.

Prefer RSS? Subscribe to the feed →