Not legal here.Obviously a safety issue.Back in the day when I played I had waistlength hair that I deliberately wore in a high plait(braid)for the very purpose of flicking in opponents eyes.
Nick who also posts on this forum was the first referee to make me tuck it inside shirt or tie it differently