$('#ProspectDtlFrm').validate({ rules: { prsptEmail: { required: { depends: function(element) { return ($('#prsptHomePhone').val() == '' && $('#prsptBusinessPhone').val() == '' && $('#prsptMobilePhone').val() == ''); } } } }, messages: { prsptEmail: 'Please enter your first name' } });
Reference
jquery validate depends rule
沒有留言:
張貼留言
留個話吧:)