Only if on an exceptionally good salary with a termination 'bonus'!
Without more detail it is hard to say with certainty. For most jobs 6-12 months might be OK, and only then under specific conditions. If you have a garden variety job for a small/medium business then the employer is going to be hard pressed to make any non-compete stick.