Luke 21:1-4 reports Jesus’ obervation of the widow throwing her two small copper coins in to the temple treasury:
Ἀναβλέψας δὲ εἶδεν τοὺς βάλλοντας εἰς τὸ γαζοφυλάκιον τὰ δῶρα αὐτῶν πλουσίους. εἶδεν δέ τινα χήραν πενιχρὰν βάλλουσαν ἐκεῖ λεπτὰ δύο καὶ εἶπεν· ἀληθῶς λέγω ὑμῖν ὅτι ἡ χήρα αὕτη ἡ πτωχὴ πλεῖον πάντων ἔβαλεν· πάντες γὰρ οὗτοι ἐκ τοῦ περισσεύοντος αὐτοῖς ἔβαλον εἰς τὰ δῶρα, αὕτη δὲ ἐκ τοῦ ὑστερήματος αὐτῆς πάντα τὸν βίον ὃν εἶχεν ἔβαλεν.
This passage is difficult in koine greek, simply due to the large number of words not found in first and second year greek textbooks. The word γαζοφυλάκιον is a combination of the word γάζα and φυλακή. The phrase τὰ δῶρα appears in the oldest manuscripts, but a few contain the phrase τα δωρα του θεου, explaining the additional words that appear in the KJV and NKJV.
The text does not even slightly allued to the matter of who was better at being righteous due to accurate law keeping. It does not imply the rich or the widow were giving the correct amount according to the law, perahps even the rich were giving more than the required amount. The point is we do not know. Luke is not suggesting Jesus had a concern for law-keeping, what we see is Jeusus concern for generousity. The rich are giving out of their surplus, they are giving what for them, may as well be the excess leftovers. The poor widow, on the other hand, is sacrificially giving, those two coins are all that she had.