No recognizance given by the accused in a criminal prosecution for his appearance before any court may be discharged for any mistake in form, if its terms are in substantial compliance with the requirements of law.