Hindu scriptures have given us guidelines to follow.

(1) Primacy of Reason

Everything written in Hindu scripture is not valid. A scriptural statement can be invalid if it does not satisfy reason.

Even the words heard from an ignorant person, if in themselves they be fraught with sense, come to be regarded as pious and wise. In days of old, Usanas said unto the Daityas this truth, which should remove all doubts, that scriptures are no scriptures if they cannot stand the test of reason.

~ Mahabharata Shanti Parva Section CXLII

The appeal to the infallibility of the Vedic injunction is misconceived. The infallibility in question refers only to the unseen forces or apurva, and is admissible only in regards to matters not confined to the sphere of direct perceptions, etc … Even a hundred statements of sruti to the effect that fire is cold and non-luminous won’t prove valid. If it does make such a statement, its import will have to be interpreted differently. Otherwise, validity won’t attach to it. Nothing in conflict with the means of valid cognition or with its own statements may be imputed to sruti.

~ **Shreemad Bhagavad Geetha 18.66, Bhashya by Shree Adi Shankaraachaarya, translation by Dr. A. G. Krishna Warrier

(2) Rejection of discriminatory verses

Any discriminatory verse in Hindu scripture is also automatically invalid according to Hindu scripture and should not be followed. This is necessary because Hinduism is not an organized dharma and does not have any central body to oversee the content of Hindu spiritual texts.

If a holy act is against the interest of other members of the society, it should not be practiced. It is Dharma which is the source of Artha and even of Kama.

~ Kurma Purana I.2.54