Skip to content

Validation error when field's name contains special characters since v4.0.0 #750

@VictorGosse

Description

@VictorGosse

Describe the bug
Form validation error when the field's name contains some special characters since v4.0.0.

To Reproduce
Steps to reproduce the behavior:

  1. Go to this sandbox
  2. Type "A" in the field
  3. Submit the form
  4. See the error:

Invalid regular expression: /^[array-2].\d+/: Range out of order in character class

Codesandbox link (Required)
link to the sandbox

Expected behavior
Before v4.0.0 the validation was working fine (you can change the version in the package.json to v3.9.0 to see that everything is ok.
I'm suspecting 985c48d to be the reason of this error.

According to me it's related to the - in the field's name. For the context we have this character because some of our fields contain UUID.

Screenshots

Image

Desktop (please complete the following information):

  • OS: iOS
  • Browser: Chrome
  • Version 133.0.6943.127

Metadata

Metadata

Assignees

Labels

next releaseMarks issues or PRs planned for the upcoming version.released

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions