$("#fileForm").validate({
rules: {
//any other rules go here
}
});
$('.your-dozen-fields-selector').rules("add", {
required: false,
accept: "png,jpg,jpeg,pdf"
});
HTML
<input type="file" placeholder="" name="poster" accept="image/*">
rules:{
poster :{
required : true,
accept: "png,jpg,jpeg,gif" }
},
messages: {
category_id__sub_category_id: 'Please select category',
seller_name: 'Please enter seller name',
email: {
required: 'Please enter email',
email: 'Please enter valid email id',
},poster:{
accept : 'Please upload PNG, JPG, or GIF only' }
0 comments:
Post a Comment