How can avoid this error where the text entered by the user maybe a bit longer then the availble space?