According to Nyāya authors, the texts different than the Veda may be valid if their author is reliable. Since directly testing the author's reliability is by norm impossible (since such texts are removed in time), one then needs to establish their author's reliability through indirect evidences, the principal ones being the consensus of the upmost people (mahājanaparigraha) and the accord with state of affairs one can verify.
Jayanta, for instance, discusses two kinds of candidates: first a reliable human being and then God himself.
Furthermore, the reliability of the author can be tested through the accord of what he says, with state of affairs one can verify. Since Sacred Texts by definition regard dharma, which cannot be known by normal people, one can only test the reliability of their author through partial agreements with verifiable items (ekadeśasaṃvāda). The idea is that if I can prove that X is reliable while saying Y —a topic which I can know through another instrument of knowledge, thus testing X's words—, I can infer out of this instance his general reliability. As typical instances of topic which can be tested count remedies against snakes' poison, medicine in general and magic.
For the Mīmāṃsā approach to the same topic, see this post. For the Nyāya approach to the validity of Sacred Texts in general, see this post.
5 hours ago