add flash messages for invalid user input