[Coldbox 4.00] Unique validator no longer present

I have noticed that the unique validator has been removed from validationmanager?, is this intended or a bug

Thanks

I was intended. It now belongs to the ORM module

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
P/F: 1-888-557-8057
Direct: (909) 248-3408

ColdBox Platform: http://www.coldbox.org

ContentBox Platform: http://www.gocontentbox.org
Linked In: http://www.linkedin.com/pub/3/731/483

Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano | twitter.com/gocontentbox

Hi Luis. I installed the module, and according to the compatibility notes, validateModel is available in every handler

i then ran validateModel on my object which is using the unique validator and it throws an error telling me that it doesnt exist
I looked inside the validationmanager code in the module and it doesnt appear to have the unique validator

if I want to use this should i revert to an older version of coldbox?

Thanks

Darren,

You cannot use unique=true anymore. It is a custom validator from the ORM module. It is in the ORM instructions.

Validation

We have also migrated the UniqueValidator from the validation module into our
ORM module. It is mapped into wirebox as UniqueValidator@cborm so you can use in your constraints like so:

{ fieldName : { validator: "UniqueValidator@cborm" } }

Luis Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com
P/F: 1-888-557-8057
Direct: (909) 248-3408

ColdBox Platform: http://www.coldbox.org

ContentBox Platform: http://www.gocontentbox.org
Linked In: http://www.linkedin.com/pub/3/731/483

Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano | twitter.com/gocontentbox

Ah ok. Thanks for your help. It’s probably best if i revert to the older version until I get more time to work through the changes with version 4

For your reference there is also a problem the cbsecurity module under coldbox 4.0. In modules/cbsecurity/interceptors/Security.cfc it seems to call the old method getColdboxOCM which no longer exists

Thanks for the note on the cbsecurity bug. I have entered a ticket. Feel free to submit a pull request for the fix.

https://ortussolutions.atlassian.net/browse/CCM-26

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com