valitron icon indicating copy to clipboard operation
valitron copied to clipboard

how to establish a rule in which 1 out of 2 array index must be present?

Open musaev-haybulla opened this issue 6 years ago • 0 comments

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)

musaev-haybulla avatar Dec 24 '19 15:12 musaev-haybulla