Unique validator custom message

Hi Guys,

Just a quick question, how do you define a custom message for the unique validator. the following

'email' = { required=true, type="email", unique=true, requiredMessage="Please enter an email address", typeMessage="Please enter a valid email address", uniqueMessage="This email address has already been used" }

Throws the error

Application Execution Exception Error Type: ValidationManager.InvalidValidatorType : [N/A] Error Messages: The validator you requested UNIQUEMESSAGE is not a valid validator

Thanks,

Richard

Hey Richard–

This was fixed in 3.7.0: https://ortussolutions.atlassian.net/browse/COLDBOX-163

If you can’t upgrade, the following tweak should resolve it in your current version: https://github.com/ColdBox/coldbox-platform/commit/434d76fc8f4e7adf0d3c661174f0d22af4ce8e20#diff-0

Thanks Joel,

I like the easy fixes. I should pay more attention to what gets fixed in each update.

Richard

Sure thing, glad it helped!