2. Suretyship can be given only for a valid obligation.
A future or conditional obligation may be secured for the event
in which it would have effect.
An obligation, resulting from a contract which under mistake or
incapacity does not bind the debtor, can be validly secured if the
surety at the time when he binds himself knows such mistake or
incapacity. (Section 681, Civil and Commercial Code)