[jQuery] Validation plugin: combine functions with strings on remote error
I'm using the validation plugin to validate a field remotely. The validation
portion works great, but I've got a question about the error message if the
validation fails.
I discovered that you can pass a function rather than a plain string as seen
below in the remote key. The problem is that when I do this, I lose the
ability to display a string of my choosing. Does anyone know how to
accomplish both?
messages: {
pagealias: {
required: 'Page alias is required',
remote: function(){
// highlight the field
$field.pulse();
// display message
'This page alias is already in use'
}
}
}
Andy Matthews
Senior Web Developer
www.dealerskins.com
P Please consider the environment before printing this e-mail.
Total customer satisfaction is my number 1 priority! If you are not
completely satisfied with
the service I have provided, please let me know right away so I can correct
the problem,
or notify my manager Aaron West at awest@dealerskins.com.