Neither a departure from the form or mode prescribed by this code in respect to any pleading or proceeding, nor an error or mistake therein, renders it invalid, unless it has actually prejudiced the defendant, or tended to his prejudice in respect to a substantial right.
Idaho Code § 19-3702