Skip to content

Commit

Permalink
Don't accept result values with .
Browse files Browse the repository at this point in the history
  • Loading branch information
VirginiaDooley committed May 7, 2024
1 parent efe36e6 commit ee09bf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ynr/apps/uk_results/tests/test_smoke_test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_form_view_creates_result(self):
resp = self.app.get(url, user=self.user_who_can_record_results)
self.assertEqual(resp.status_code, 200)
self.assertContains(resp, 'inputmode="numeric"')
self.assertContains(resp, r'pattern="[0-9\s\.,]*"')
self.assertContains(resp, r'pattern="[0-9\s\,]*"')
form = resp.forms[1]
form["memberships_13"] = 1000
form["memberships_14"] = 2000
Expand Down
2 changes: 1 addition & 1 deletion ynr/apps/utils/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def build_attrs(self, base_attrs, extra_attrs=None):
attrs.update(
{
"inputmode": "numeric",
"pattern": r"[0-9\s\.,]*",
"pattern": r"[0-9\s,]*",
"oninvalid": "this.setCustomValidity('Enter a number')",
}
)
Expand Down

0 comments on commit ee09bf2

Please sign in to comment.