New Quizzes: Validate Student Input (with Regular Expressions)

It would be very helpful to be able to require that input into a free text assignment submission or free text entry in a quiz match a regular expression - not for checking the correct answer, but so that a student enters a valid attempt at an answer.  For example, currently a numerical blank in a quiz will not allow students to enter letters.  With this option, a fill in the blank question + regular expression could behave similarly, for more than only numerical fields - students could not enter numbers, multiple words, or accidentally copy in html tags when a blank or assignment submission requires a single alphabetic word (specified by a regular expression).  This would also discourage students from entering full names when usernames are requested and similar errors.  It would enable the assignment turn in to better validate many types of submissions - commit IDs, specific types of URLs, single words, etc. 

Community Champion


I want to make sure people understand this feature request correctly.

You are asking that students be prevented from entering invalid responses. That is, you want students to know as they type, before they submit, that the answer doesn't mean the correct criteria (isn't numeric, doesn't match a phone number, doesn't begin with a letter followed by up to 8 letters or digits, etc) as specified by a regular expression 

It sounds like you want more than just the typical "not a valid number" type response that happens when the field loses focus, but that they would not be able to even type a character that was not allowed.

This differs from the existing functionality of New Quizzes where regular expressions can be used on fill in the blank questions after the student has submitted their answers.

Community Champion

Here is a similar idea but limited in scope to numeric response questions: 

It explains some background related to user response validation.

Status changed to: Archived
Comments from Instructure

As part of the new Ideas & Themes process, all ideas in Idea Conversations were reviewed by the Product Team. Any Idea that was associated with an identified theme was moved to the new Idea & Themes space. Any Idea that was not part of the move is being marked as Archived. This will preserve the history of the conversations while also letting Community members know that Instructure will not explore the request at this time.