how does node validate scriptSig
What you are asking about is the message covered by the signature. In Bitcoin, this message is defined by the consensus rules and is a modification of the transaction the signature is contained in.
The exact form of this message for non-segwit transactions is explained in How to redeem a basic Tx?