Format: value must be formatted using this pattern (PCRE syntax).
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/Constraint:Format#Format
Documentation icon Template documentation[view · edit · history · purge ] [translate this template]

If a string also includes leading or trailing whitespaces, non printable characters, %20 marks, etc, the report will list the string as incorrectly formatted.

Constraints are described using a form of regular expression.

This template categorizes talk pages into Category:Properties with format constraints.




  • Two digits: {{Constraint:Format|pattern=\d\d}}
  • Two digits or more digits, the first one not being a zero {{Constraint:Format|pattern=[1-9]\d+}}

White spaceEdit

Do not include spaces!

  • Good: {{Constraint:Format|pattern=\d\d}}
  • Bad: {{Constraint:Format|pattern= \d\d }}

Special formatsEdit

If the pattern includes curly braces or pipe ("|"), it needs to be included in nowiki tags.


  • {{Constraint:Format|pattern=<nowiki>\d{1,4}</nowiki>}}
  • {{Constraint:Format|pattern=<nowiki>(tt|nm|ch|co)\d\d\d\d\d\d\d</nowiki>}}

Common valuesEdit

only digits
lowercase letters, digits or a hyphen (dash)
no spaces; no slashes

See alsoEdit

External toolsEdit