jquery - Input file type validation message not displaying -


i have file upload field in form , validating field using jquery validation following:

my input tag:

<input type="file"  id="photo" name="photo" /> 

validation:

    $('#create_teacher').validate({     rules: {         photo:{             required: true,              extension: "jpeg,jpg,gif,png"         },     },     messages: {         photo: { // <- refers name attribute, not id.             required: "this field mandatory",             extension: "accepts jpeg, jpg, gif or png"         }     }   }); 

can me in .


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -