I appreciate that 250w is the UK legal but
Does this mean that any hub motor that says 500W, 400W is illegal just clarifying before I buy thanks
Yes
In case you don't know, it's the controller that decides how much power you get, not the motor. The numbers written on the motor can be a bit misleading. You can get 250w motors that are happy running at 1000w, and they're legal.
Having said that, there are problems with running front motors at high power. Firstly, they can't translate their power into climbing power because the wheel can't get enough traction on hills. Secondly, you need very strong forks and drop-outs because of the torque. The torque from the motor will also lock the forks and prevent the suspension from working properly.
If you want higher power, it's always best to fit a rear motor.