AngularJS rewrite
Restrict valid input to 1 character