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

When using input fields with named indices, the regexp in the getErrors function is very limited. For e.g. it fails to parse "field[0][my_field]".