2Unless the contract otherwise provides, a violation of any criminal or other law in force in the Province or elsewhere does not, ipso facto, render unenforceable a claim for indemnity under a contract of insurance except where the violation is committed by the insured, or by another person with the consent of the insured, with intent to bring about loss or damage; but in the case of a contract of life insurance this section applies only to disability insurance undertaken as part of the contract.