1 ) jQuery validator method jQuery.validator.addMethod('img_ext',function(value,element){ if(value=="") { return true; } //alert(element.files[0].size); var ext_index=value.lastIndexOf('.'); var ext=value.substring(ext_index+1); var ext_lcase=ext.toLowerCase(); if(ext_lcase=='jpeg' || ext_lcase=='jpg' || ext_lcase=='png' || ext_lcase=='gif') { return true; } else { return false; } }, "Please ...
Coding Cheatsheets - Learn web development code and tutorials for Software developers which will helps you in project. Get help on JavaScript, PHP, XML, and more.