added validate function to bug_report model