You can ask a court to set aside a will if the will-maker was mentally incapable when they made it — for example, because of dementia.
The test is whether the will-maker could make decisions when the will was drawn up.
In practice, this means they need to understand what a will is, the effect of making one, the extent and value of their property, and any expectations their family, friends or others might have that they will be left something in the will.
Mental incapacity does not have to be permanent, and a person can be mentally incapable in relation to some types of decision but not others. If they were often confused and forgetful around the time they made their will, you may have a claim. A court may want to see evidence from a doctor or psychiatrist and from people who were around at the time the will was made.