You can use $.format to create dynamic messages, but that works only
when the dynamic part is specified as a parameter.

$.validator.addMethod("dynamic_check", function(value, element, param) {
       if(incorrect(value, param)){
       return false;}
}, $.format('dynamic message goes here with param {0}'));

Jörn

On Sat, Jan 24, 2009 at 10:54 AM, thomas <thomas.bik...@gmail.com> wrote:
>
> Hello group!
>
> Very happy to have deployed validation plugin ( I mostly need to check
> validity of EAN/UPC numbers for barcode generation). You can see it in
> action here: http://www.barcoderobot.com/ean-13.html
>
> The question I am struggling with though is howto return a
> 'dynamically generated' message. Say, '13 digits are required, you
> have XX'?
>
> $.validator.addMethod("dynamic_check", function(value) {
>        if(_value is incorrect_){
>        return False;}
> }, 'dynamic message goes here');
>

Reply via email to