Expanded regular expression in getErrors to accept a wider range of keys