matrix validate