Add validation for inputted RegEx.