WordPress / WordPress/pattern-directory

Pattern Validation: Do some content validation early

Open
#484 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Component] Pattern Creator
Dominant language
PHP
Stars
134
Forks
46
Avg merge
9h 4m
Merged PRs (30d)
19

Description

PR https://github.com/WordPress/pattern-directory/pull/477 introduced some content validation on the PHP side, but it would be nice if we could validate the pattern content before sending someone through the whole submission modal.

From https://github.com/WordPress/pattern-directory/pull/477#issuecomment-1100960512

Could we run the < 3 & > 75 checks on clicking Submit and show the red notice as is? That would make the creator align more with the way Gutenberg handles content/API errors. The title validation could be done inline where the input is in the modal... before going through the hassle of writing a description and choosing categories just to have it fail at something that was technically step 1.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review PR #477 and its linked issue comment first to understand the existing PHP validation and the submission modal flow. Trace where the modal handles Submit and where the current content checks run. Done means the <3 and >75 content checks happen on Submit with the existing red notice, while title validation occurs inline before the remaining modal steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.