This is working fine and it does not allow to enter more than 50 characters, where as if I paste any data from the clipboard it allows more than 50 character. How can i restricts that too.

Please advice.