When a family court is called upon to rule on the terms and conditions of the exercise of parental authority or on the upbringing of a minor child, or when it decides to entrust the child to a third party, it may have regard to any agreements that the father and mother may have freely entered into between themselves on this subject, unless one of them can show serious grounds for revoking his or her consent.