What are the conditions required by law for a valid marriage contract?