No surety or his or her representative shall confess judgment or suffer judgment by default in any case where he or she is notified that there is a valid defense, if the principal will enter himself or herself defendant to the action and tender to the surety or his or her representatives good security to indemnify him or her, to be approved by the court.