A contract which provides for the sale of real estate located in this state, and for the forfeiture of the vendee’s rights in such contract in case the vendee fails, in specified ways, to comply with said contract, shall, nevertheless, not be forfeited or canceled except as provided in this chapter.