Automattic / Automattic/jetpack

Contact Form: Support custom field validation by themes/plugins

Open
#8,174 1 comment 0 reactions 0 assignees View on GitHub
[Feature] Forms [Pri] Low Enhancement Good For Community
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

#### Steps to reproduce the issue

The `validate()` function of `Grunion_Contact_Form_Field` has no filters so it isn't easy to write custom validation logic for a field - for example adding your own validation for a url or making the email validation stricker/looser

#### What I expected

A filer

#### What happened instead

There was no filter

Contributor guide

Open the contributing guide

Research direction

Start by locating the Grunion_Contact_Form_Field class and its validate() function in the Jetpack codebase. Review nearby validation behavior and existing filter patterns, then determine how a filter can support custom URL or email validation. Done means themes and plugins can alter field validation without modifying the class.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.