[coldbox-3.5.0-BE] Validation Framework

Is there a way outside of using i18n to provide custom error messages to each specific validation property? We have so many forms with differing variants for each that having to add resource bundles that are specific to each constraint seems like a lot of effort. Would something like this be possible?

sharedConstraints = {
simpleRegistration = {
companyName= {required=true,requiredMessage=“Please provide your company name”},
emailAddress= {required=true,requiredMessage=“Please provide your email address”, type=“email”,typeMessage=“Your email address is formatted incorrectly”}

This would give us a lot of flexibility and if the message property isn’t present the framework can fall back to the default message.



That was my last ticket and just committed. The custom messages on the constraints take precedence now.


So your example works!

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano


Thanks Luis! Your speed and efficiency never cease to amaze!

Quick! Luis! What am I thinking? Crap! You’ve already built it?!?!?!

Yes, folks, it is true. The latest news is that of a collaboration between Luis Majano and Denny Valliant. The new project is stunning. You think it, and the code base and documentation is written for you, automagically, before your very eyes! I was recently privileged to see the initial POC, and let me just say, you WILL be blown away!

The name? LuinnyReaderDoccoBox