/ Published in: jQuery
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
jQuery(function() {
jQuery("#form_field").validate({
rules: {
bus_ent_id: "required", //only one method doesn't need brackets
inv_in_transit: {required:true,number:true}, //multiple methods requires brackets
outstanding_credits: {required:true,number:true},
cores_on_hand: {required:true,number:true},
warranty_part_on_hand: {required:true,number:true},
comments: {maxlength:500},
submitted_by: "required"
},
messages: {
bus_ent_id: "You must choose your store from the drop down list.",
inv_in_transit: "You must enter a valid Quantity Inventory in Transit amount. If none, please enter 0",
outstanding_credits: "You must enter a valid Outstanding Credit amount. If none, please enter 0",
cores_on_hand: "You must enter a valid Core on Hand amount. If none, please enter 0",
warranty_part_on_hand: "You must enter a valid Warranty Part on Hand amount. If none, please enter 0",
comments: "Must be under 500 characters in length",
submitted_by: "This form is not complete. Submitted by is Empty! Please enter your name."
}
});
});
URL: http://rocketsquared.com/wiki/Plugins/Validation#List_of_built-in_Validation_methods
Comments
 Subscribe to comments
                    Subscribe to comments
                
                