Page MenuHomePhabricator

Refuse to save page in "create/edit with form" (in the extension Page Forms) if a particular pattern is matched in a particular field
Closed, InvalidPublicFeature

Description

Feature summary (what you would like to be able to do and where): In the MediaWiki extension Page Forms, I want to be able to make create/edit with form refuse to save the page if a field has a pattern that I define

Use case(s): On the Sagan 4 wiki we use page forms to force a specific format on certain types of pages that are often uploaded in bulk, and in light of some very interesting recent page creation choices, we would really like to have a way to prevent broken formatting within the fields themselves from slipping through the cracks

  • Preventing use of formatted text in fields that *must* be unformatted (eg. if it's gonna be stored as a page property or otherwise processed for information that becomes a nightmare if I have to deal with the varied ways people might format it to look fancy)
  • Similarly, also preventing incomplete removal of things like wikilinks that will break the template if left open on one end by stopping you if you missed a bracket (happened like half a dozen times after I told people that no we are not supposed to include wikilinks in the field that is auto-linked and gets parsed for dozens of properties...after people added the wikilinks themselves to their submissions on the forum because there was a rumor that they were supposed to...)

Benefits: more control over what gets put in a text field

Event Timeline

Aklapper renamed this task from feature request: refuse to save page in create/edit with form if a particular pattern is matched in a particular field to Refuse to save page in create/edit with form if a particular pattern is matched in a particular field.May 23 2026, 10:17 AM

removed MediaWiki-extensions-Page_Forms.

🤨

This feature request is for a specific MediaWiki extension that has its own special page for creating new pages completely separate from the regular editors. I don't know what those other things are.

Disgustedorite renamed this task from Refuse to save page in create/edit with form if a particular pattern is matched in a particular field to Refuse to save page in "create/edit with form" (in the extension Page Forms) if a particular pattern is matched in a particular field.May 24 2026, 2:22 PM

I do now. The documentation for this specific extension is a bit difficult to navigate in my defense

The regexp input type does exactly what I needed. Though, of note, multiple conditions seems to just straight up not work and I had to merge them all into one condition to get the behavior I wanted.

I'm glad it worked, though with some difficulty! Can this be closed?