Why not calling model data annotation in mvc
Hi,I am trying to call data annotation in mvc. First i want check data annotation then call jquery validation for go next tab. I have tab each tab calling next button. so before next button press I want check data annotation validation, then check jquery validation to go for next tab.
$(document).ready(function () {
$('#btnNext').on('click', function (e) {
var Valid = true;
if ($('#ddlRoleUserID').val() != "" && $('#ddlPortUserID').val() != "" && $('#txtPAN').val() != "") {
Valid = true;
return true;
}
else {
Valid = false;
return false;
}
if (Valid == true)
{
$('.shipments-tabs > .active').next('li').find('a').trigger('click');
$('.shipments-tabs > .active').prev('li').children('a').find('i').addClass('icon-done').removeClass('icon-in-progress');
$('.shipments-tabs > .active').removeClass('disable-click').children('a').find('i').addClass('icon-in-progress').removeClass('icon-pending');
}
});
});