Although the following statement of the law is based upon legislation in New South Wales, it mirrors the common law in Western Australia.
As Brereton J expressed it in Tullett Prebon (Australia) Pty Ltd v Purcell  NSWSC 852; 175 IR 414:
“In New South Wales, a restraint of trade is valid to the extent that it is not against public policy; Restraints of Trade Act 1976 (NSW), s 4(1); Koops Martin Financial Services Pty Ltd v Reeves  NSWSC 449.
A restraint of trade is not contrary to public policy if it is reasonable as between the parties, and not unreasonable in the public interest, so that while affording adequate protection to the party in whose favour it is imposed, it is not injurious to the public [Nordenfelt v Maxim Nordenfelt Guns & Ammunition Co Ltd  AC 535 at 565; Herbert Morris Ltd v Saxelby 1 AC 688 at 706- 707; Lindner v Murdock’s Garage  HCA 48; (1950) 83 CLR 628 at 653]. Whether a restraint is reasonable having regard to the interests of the parties depends on two, albeit related, considerations: first, whether the covenantee has a legitimate protectable interest, and secondly, whether the restraint is no more than reasonable for the legitimate protection of that interest. A covenantee is not entitled to be protected against mere competition; the legitimate interests which may be the subject of protection by covenant are in the nature of proprietary subject matter [Vandervell Products v McLeod  RPC 185; Tank Lining Corp v Dunlop Industries Ltd (1982) 140 DLR (3d) 659 at 664], including trade secrets and confidential information, and goodwill including customer connection. The validity of a restraint is to be judged at the time at which the contract is made, by reference to what the restraint entitles or requires the party to do, rather than what they intend to do or have actually done [Nordenfelt at 573-574; Commercial Plastics Ltd v Vincent  1 QB 623 at 644; Curro v Beyond Productions [Pty Ltd (1993) 30 NSWLR 337] at 344;Woolworths Ltd v Olson  NSWCA 372 at 40].”
And see BGC Partners (Australia) Pty Limited v Hickey  NSWSC 90 delivered18 February 2016 per Stevenson J