$.validator.addMethod("checksize", function(value,element){
var node = document.getElementById('pimage1');
var check = node.files[0].fileSize;
alert(check);
if (check < 2097152)
return true;
else
return false;
}, "Select image less than 2mb");
==========================================
JS ERROR
Line : 8
char : 17
Error : files.0 is null or not an object
code : 0
==========================================