You can catch this with JavaScript. You can also write a plugin to validate the attribute during the save. If you have custom code that updates the entity from a web service the JavaScript will not trigger this is an example of why you might add validation in a plugin.
Dean Jones
http://www.powerobjects.com