fixing issue where users were able to submit empty values through keyboard