I need to validate two fields in my form to enable the Submit button for the end user, but removeClass('disabled')
is not working.
$('#main-form').on(function () {
simCode = $('#main-form [name=code]').val().length;
carrierId = $('#main-form [name=carrierId]').val();
if (simCode == 20 || carrierId != "null") {
$('#save').removeClass('disabled');
}
});
Remembering that simCode
receives the values of an input type text and carrierId
receives the value of a select option