Add validations and flash messages