add flash for failed validation of course def