Given "maritalstatus"radio buttons (married,unmarried,divorced,separated), I would then like to validate spouse’s name field ONLY…while other fields for respective unmarried, divorced, separated fields are BYPASSED the validation process (ie. there’s no need to validate these fields). Does return -1 accomplish this?
rules:{
firstname: webix.rules.isNotEmpty,
lastname: webix.rules.isNotEmpty,
address: webix.rules.isNotEmpty,
spousename:function(data,obj) {
if(($$('martialstatus').getValue()) == "married") { return ($$('spousename').getValue()); }
if(($$('martialstatus').getValue()) == "unmarried") { return -1; }
if(($$('martialstatus').getValue()) == "divorced") { return -1; }
if(($$('martialstatus').getValue()) == "separated") { return -1; }
}