I am using Javascript and its prototype feature to call the function and wrote the following piece of code.
function validateInteger(value) {
console.log(value);
if (value == '' || value == null){
return null;
}
}
function isValidInteger(obj) {
console.log(obj);
isValidInteger.prototype.validate = validateInteger;
}
So here I want to know, how can I pass this obj param to validateInteger. and validateInteger must also accept its value on form submit.
Could some one help me on this?
Thanks