added validation errors with flash message.