Under UK law following things are necessary to form a valid contract.
1. Offer: An offer is a definite and unequivocal statement of willingness to be bound on specified terms and conditions.
2. Acceptance: Acceptance is unconditional and unqualified consent to all the terms of an offer.
3. Intention to create legal relations: Both parties should have an intention to create a legally enforceable relations. Usually domestic agreements do not have an intention to create legal relations.
4. Other matters
a.) Contracting parties should do the contract willfully
b.) Both parties should have the capacity to enter into contract. (age above 18)
c.) It is not necessary for a contract to be in written form. An oral or implied contract is as valid as a written contract in law.