Automattic / Automattic/jetpack
Form Block: Using dots, special characters in the ID fields prevents form validation
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
#### Steps to reproduce
1. Starting at URL: Add the "Form Block" and within the form block add the name field and mark it to be required:

2. Under Block - Field Settings - Dafault Value, add something like: `Your Name ...`

3. Publish your form, go to the site, remove the default values in the name field and add your name as normal:

4. Click on Submit
#### What I expected
To see the message that my form has been submitted successfully
#### What happened instead
I got an error that the valid name is required:
(on the screenshot I was also testing the email field so the second error is not related to the name field issue)
I thought this might be related to special characters use but signs such as `?` or `<` seem to have worked when set in that field.
#### Context / Source
#user-repor in #1846079-zen
Contributor guide
Research direction
Start with the Form Block's field settings and validation path, then reproduce the issue using a required name field whose default value contains dots or special characters. Compare submission behavior with and without those characters. Done means the submitted name validates normally and the form reports successful submission.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100