Can you use money given by family as a deposit?
Yes, there are banks that will accept a deposit funded by a gift from a family member, but the bank will still carry out checks on the deposit. This includes that the third party has not accrued debt to provide you with the gift or be sourced from tax haven savings.
If a person gifting you a deposit for a mortgage has used their personal savings, sold a house or liquidated shares or assets to do so, then these will all be acceptable sources. We will need to know some details about this, including that all applicable taxes have been paid when you received the gift.