Thanks, unfortunately 3.6.5 code is a bit different, and most of it already happens in the Update() function... Also you should really use the UIInput's Insert function so that validation works properly.
P.S. That said though, I've merged your code in there, somewhat. No idea if it will work, naturally... but I did. <_<