added validation and custom flash notices