I'm using the geddy framework and following the validation examples.
In my User model I have the following custom validation rule:
this.validatesWithFunction('password', function(val) {
var re = /^[a-z0-9]+$/i;
return re.test(val)
}, {message: 'must be alphanumeric'})
In my view I do this:
<% if(params.err['password']) { %><%=params.err['password'];%><% } %>
The validation rule does work as expected. However, the message I get back appears to me a generic ("password" is invalid) message rather than the one I have specified in the options ("must be alphanumeric").
Any pointers as to where I am going wrong please?