teamcfadvance / ValidateThis

An object oriented validation framework for ColdFusion objects
http://www.validatethis.org
44 stars 32 forks source link

Default client side validation message for maxLength does not specify field name #56

Closed dswitzer closed 13 years ago

dswitzer commented 13 years ago

The default client side error validation for the "maxLength" rule does not show which field the error relates to. The message is in the following format:

"Please enter no more than {maxLength} characters."

Because it doesn't reference the offending field, you pretty much always have to supply a manual failureMessage attribute which indicates which field the error was thrown for.

bobsilverberg commented 13 years ago

This failure is being generated by the jQuery plugin - it's not generated by VT at all, which is why you're seeing that message. There is another issue open, #57, which suggests that we should not use the plugin's default messages at all ans always generate them via VT so the messages are the same on the client and server. Whether we do that or not is up for debate, but I think that issue covers this one, so I'm going to mark this one as closed.