basic validation and edit; flash messages not working