Hi,
I'm using v10.1p_2016-03-27/Pro Deployment and trying to use a requiredIf validator and the docs state I should be passed a record parameter: record - the "record" object - the set of values being edited by the widget.
This works sometimes but in one case it does not and having traced the issue I can see why. In ISC_Forms.js we have the setRequiredIf function and it doesn't pass 'record' as a parameter at all:
Other parts of the code do pass the record parameter so I'm sure that its an oversight that can be quickly rectified:
I'm using v10.1p_2016-03-27/Pro Deployment and trying to use a requiredIf validator and the docs state I should be passed a record parameter: record - the "record" object - the set of values being edited by the widget.
This works sometimes but in one case it does not and having traced the issue I can see why. In ISC_Forms.js we have the setRequiredIf function and it doesn't pass 'record' as a parameter at all:
Code:
if (validator.expression != null && !isc.isA.Function(validator.expression)) { isc.Func.replaceWithMethod(validator, "expression", "item,validator,value"); } // set the hidden value for item._required according to the results of the // expression item._required = validator.expression.apply(this, [item, validator, value]);
Code:
if (validator.expression != null && !isc.isA.Function(validator.expression)) { isc.Func.replaceWithMethod(validator, "expression", "item,validator,value[B],record[/B]"); } // set the hidden value for item._required according to the results of the // expression item._required = validator.expression.apply(this, [item, validator, value[B], values[/B]]);
Comment