I am trying to achieve that if file field is not empty then only validate other wise not on the update details form.
I am using following code of https://jqueryvalidation.org/ plugin :
jQuery.validator.addMethod("filetype", function(value, element) {
var types = ['jpeg', 'jpg', 'png'],
ext = value.replace(/.*[.]/, '').toLowerCase();
if (types.indexOf(ext) !== -1) {
//$("#city_banner-error").html('');
return true;
}
return false;
});