# HG changeset patch # User Benoît Allard # Date 1414074753 -7200 # Node ID e0830bcab00492243dc481811e43e6411a6fb0e9 # Parent 67c4b299736e49d9740c0835e67bd625c4706a0a Add (optional) regex matching to our input fields diff -r 67c4b299736e -r e0830bcab004 farol/templates/document/edit_revision.j2 --- a/farol/templates/document/edit_revision.j2 Thu Oct 23 16:18:30 2014 +0200 +++ b/farol/templates/document/edit_revision.j2 Thu Oct 23 16:32:33 2014 +0200 @@ -30,7 +30,7 @@ {% block content %}

Revision contains all the elements required to track the evolution of a CVRF document. Each change to a CVRF document should be accompanied by Number, Date, and Description elements.

- {% call textinput("number", "Number", "a.b.c.d", number, required=True) %} + {% call textinput("number", "Number", "a.b.c.d", number, required=True, regex='(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*)){0,3}') %}

Number should contain the numeric version of the document. Like the Version element above, it is a numeric tokenized field of the format “nn” with up to four fields “nn.nn.nn.nn”. It is recommended that this be a monotonically increasing value. Minor revisions should be used for less-significant changes (for example, 1.0.0.0 to 1.0.0.1). Major, actionable changes should lead to a major increase of the version number (for example, 1.0 to 2.0).

Examples of such changes include: