Is there a better way of writing the below JS code?
var check1 = model1.validateAll();
var check2 = model2.validateAll();
if (check1.isValid === false || check2.isValid === false) {
self.showValidationErrors(check1.messages);
self.showValidationErrors(check2.messages);
return true;
}
My only concern is once inside the if block, either check1.messages OR check2.messages can have some value (depending on check1.isValid OR check2.isValid is false)
check1.messagesifcheck1.isValid === false