Skip to content

Commit 5ec243e

Browse files
committed
Changed the IPR patent number regex to permit space between country code and serial number, and expanded on the help text for the IPR patent number field.
- Legacy-Id: 17573
1 parent d266a8b commit 5ec243e

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

ietf/ipr/forms.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,21 @@ class Meta:
113113
}
114114
help_texts = { 'sections': 'Sections' }
115115

116+
patent_number_help_text = "Enter one or more comma-separated patent publication or application numbers as two-letter country code and serial number, e.g.: US62/123456 or WO2017123456. Do not include thousands-separator commas in serial numbers. It is preferable to use individual disclosures for each patent, even if this field permits multiple patents to be listed, in order to get inventor, title, and date information below correct."
116117
validate_patent_number = RegexValidator(
117118
regex=(r"^("
118-
r"([A-Z][A-Z]\d\d/\d{6}"
119-
r"|[A-Z][A-Z]\d{6,12}([A-Z]\d?)?"
120-
r"|[A-Z][A-Z]\d{4}(\w{1,2}\d{5,7})?"
121-
r"|[A-Z][A-Z]\d{15}"
122-
r"|[A-Z][A-Z][A-Z]\d{1,5}/\d{4}"
123-
r"|[A-Z][A-Z]\d{1,4}/\d{1,4}"
124-
r"|PCT/[A-Z][A-Z]\d{2}/\d{5}" # WO application, old
125-
r"|PCT/[A-Z][A-Z]\d{4}/\d{6}" # WO application, new
119+
r"([A-Z][A-Z] *\d\d/\d{6}"
120+
r"|[A-Z][A-Z] *\d{6,12}([A-Z]\d?)?"
121+
r"|[A-Z][A-Z] *\d{4}(\w{1,2}\d{5,7})?"
122+
r"|[A-Z][A-Z] *\d{15}"
123+
r"|[A-Z][A-Z][A-Z] *\d{1,5}/\d{4}"
124+
r"|[A-Z][A-Z] *\d{1,4}/\d{1,4}"
125+
r"|PCT/[A-Z][A-Z]*\d{2}/\d{5}" # WO application, old
126+
r"|PCT/[A-Z][A-Z]*\d{4}/\d{6}" # WO application, new
126127
r")[, ]*)+$"),
127-
message="Please enter one or more patent publication or application numbers as country code and serial number, e.g.: US62/123456 or WO2017123456." )
128+
message=patent_number_help_text)
129+
130+
128131

129132
"""
130133
Patent application number formats by country
@@ -208,7 +211,7 @@ class GenericDisclosureForm(forms.Form):
208211
submitter_email = forms.EmailField(required=False)
209212
#patent_info = forms.CharField(max_length=255,widget=forms.Textarea, required=False, help_text="Patent, Serial, Publication, Registration, or Application/File number(s), Date(s) granted or applied for, Country, and any additional notes.", strip=False)
210213
patent_number = forms.CharField(max_length=127, required=False, validators=[ validate_patent_number ],
211-
help_text = "Patent publication or application number (2-letter country code followed by serial number)")
214+
help_text = patent_number_help_text)
212215
patent_inventor = forms.CharField(max_length=63, required=False, validators=[ validate_name ], help_text="Inventor name")
213216
patent_title = forms.CharField(max_length=255, required=False, validators=[ validate_title ], help_text="Title of invention")
214217
patent_date = forms.DateField(required=False, help_text="Date granted or applied for")
@@ -277,7 +280,7 @@ class IprDisclosureFormBase(forms.ModelForm):
277280
updates = SearchableIprDisclosuresField(required=False, help_text=mark_safe("If this disclosure <strong>updates</strong> other disclosures identify here which ones. Leave this field blank if this disclosure does not update any prior disclosures. Note: Updates to IPR disclosures must only be made by authorized representatives of the original submitters. Updates will automatically be forwarded to the current Patent Holder's Contact and to the Submitter of the original IPR disclosure."))
278281
same_as_ii_above = forms.BooleanField(required=False)
279282
patent_number = forms.CharField(max_length=127, required=True, validators=[ validate_patent_number ],
280-
help_text = "Patent publication or application number (2-letter country code followed by serial number)")
283+
help_text = patent_number_help_text)
281284
patent_inventor = forms.CharField(max_length=63, required=True, validators=[ validate_name ], help_text="Inventor name")
282285
patent_title = forms.CharField(max_length=255, required=True, validators=[ validate_title ], help_text="Title of invention")
283286
patent_date = forms.DateField(required=True, help_text="Date granted or applied for")

0 commit comments

Comments
 (0)