Describe the bug
There is currently no validation checking whether an instructor is properly entering their course code when they try to make a new course. Course codes can only contain lowercase letters, numbers, and underscores, but this is not enforced in the frontend. When an instructor tries to make a course with an invalid code, a message will appear indicating that the course was made successfully, when in fact it isn't. This can be very confusing for people that are unaware of the restrictions on course codes.
Expected behavior
Either there should be frontend validation preventing submission on the New Course page if the course code is invalid, or an error message should indicate that course creation failed due to invalid course code, or both.
To Reproduce
Steps to reproduce the behavior:
- Sign in as instructor
- Navigate to the New Course page
- Try to create a course with only lowercase letters, numbers, and underscores
This is a valid course code, so a new course should be made and become visible after a few seconds and a page refresh.
- Now go to the New Course page again
- Try to create a new course with special characters, uppercase letters, and/or spaces (anything beyond what is stated as being acceptable in course codes)
You will still get the following message, but your course will not be created; the new course creation will silently fail.

Configuration
- OS: Windows 11
- Browser: Brave (Chromium)
Describe the bug
There is currently no validation checking whether an instructor is properly entering their course code when they try to make a new course. Course codes can only contain lowercase letters, numbers, and underscores, but this is not enforced in the frontend. When an instructor tries to make a course with an invalid code, a message will appear indicating that the course was made successfully, when in fact it isn't. This can be very confusing for people that are unaware of the restrictions on course codes.
Expected behavior
Either there should be frontend validation preventing submission on the New Course page if the course code is invalid, or an error message should indicate that course creation failed due to invalid course code, or both.
To Reproduce
Steps to reproduce the behavior:
This is a valid course code, so a new course should be made and become visible after a few seconds and a page refresh.
You will still get the following message, but your course will not be created; the new course creation will silently fail.

Configuration