Restriction in text box

I have a problem with how to make restriction in text box to take specified initial character, means, if I have a field ‘Managing_Unit’ whose text box value begins with letters ‘EC’ only.



No standard HTML based way to do this that I know of. You can probably do something with javascript. (I'll let the javascript experts here tell you how - my attempt would likely be wrong.)