An agreement like the one you descrive is enforceable. From the language you quote, if you terminate employment early, you will be in breach and could be immediately terminated and paid only to the moment you gave notice--which may not be a problem for you. However, i it is also possible that if your breach (i.e. you leaving with insufficient notice) caused your employer some direct loss (e.g. they lost a client because you left before finishing some important deadline; or they had to hire someone at a higher rate or salary than you on short notice, to take up the work), they might be able to also sue you for the damage or loss thereby caused, so long as such should have been reasonably foreseeable by you (that is, so long as you could have anticipated the loss or damage you'd cause).