valitron
valitron copied to clipboard
how to establish a rule in which 1 out of 2 array index must be present?
How is it possible to implement such a check: If there are products, then there must be 1 out of 2 indices - positive or negative, for example
products is absent - true products[negative] = [1,2,3] -? true products[positive] = [4,5,6] -> true products[negative] = [1,2,3] AND products[positive] = [4,5,6] -> true products[blablabla] = [4,5,6] -> false (fail index) products - false (nothing index)