Automattic / Automattic/jetpack
Enhancement: Forms - add pattern attribute to forms URL field
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
Jetpack
### What
It could be helpful in some cases to include the pattern attribute to the `field-url` field, in a way that can be customizable in the editor.
### How
This was suggested in the form of a request regarding how to add the attribute, in a forum thread: https://wordpress.org/support/topic/add-validation-pattern-on-wpjetpack-field-url/
### Why add this
The pattern attribute can add a level of validation to the `field-url` field, ensuring only URLs fitting specific patterns are accepted. See the [Mozilla developer docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern) for more information.
Contributor guide
Research direction
Start by locating Jetpack Forms' implementation of the field-url field and the editor configuration that controls its attributes. Review the linked forum request and the MDN pattern documentation, then identify the relevant tests or add coverage; done means the field accepts a customizable pattern and validation behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, php
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100