0

email_i に動的に値を代入したい.......

var v = $("#email_address").validate({  
        rules: { activation_code: {
                required: true,
                alphanumeric: true,
                remote: "mail.php?action=activation_code&email="+**email_i**
            }
        }, 
messages: { 
activation_code: {
                required:       "Please input your activation code.", 
                alphanumeric:   "Only latin characters, numbers and _ sign are allowed.",
                remote:         "Sorry, activation code is incorrect."
            }
        }, 
success: function(label) {
            label.addClass( "formSuccess" );
            label.html('<img src="HelpOneAnother/giveNet/themes/givearang_1001/gfx/icons/ok.gif" border="0" \>') ;
}
});
4

1 に答える 1

0

rules('add')ドキュメントごとにメソッドを使用します。

http://docs.jquery.com/Plugins/Validation/rules#.22add.22rules

$('#emailFieldID').rules('add',{

   ruleIwantForEmail: true
})
于 2013-01-02T06:51:58.403 に答える