Display error messages in case of invalid input typed