From d45966e1fd86057e82e352a4faac199f03824bea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?No=C3=A9mie=20Lehuby?= <noemie@junglebus.io>
Date: Fri, 18 Feb 2022 15:17:02 +0100
Subject: [PATCH] improve validation of interval tag
---
resources/data/validator/numeric.mapcss | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/resources/data/validator/numeric.mapcss b/resources/data/validator/numeric.mapcss
index 821df43cd..07f60f203 100644
|
a
|
b
|
node[fire_hydrant:pressure="#"] {
|
| 530 | 530 | throwError: tr("unusual value of {0}", "{0.key}"); |
| 531 | 531 | } |
| 532 | 532 | |
| 533 | | *[interval][interval !~ /^([0-9][0-9]?|[0-9][0-9]:[0-5][0-9](:[0-9][0-9])?)$/] { |
| | 533 | *[interval][interval !~ /^([0-9][0-9]?[0-9]?|[0-9]+[0-9]:[0-5][0-9](:[0-5][0-9])?)$/] { |
| 534 | 534 | throwWarning: tr("unusual value of {0}", "{0.key}"); |
| 535 | 535 | assertNoMatch: "way interval=5"; |
| 536 | 536 | assertNoMatch: "way interval=20"; |
| 537 | 537 | assertNoMatch: "way interval=00:05"; |
| 538 | 538 | assertNoMatch: "way interval=00:05:00"; |
| 539 | 539 | assertNoMatch: "way interval=03:00:00"; |
| 540 | | assertMatch: "way interval=123"; |
| | 540 | assertNoMatch: "relation interval=168:00:00"; |
| | 541 | assertNoMatch: "relation interval=120"; |
| 541 | 542 | assertMatch: "way interval=0:5:0"; |
| 542 | 543 | assertMatch: "way interval=00:65:00"; |
| | 544 | assertMatch: "way interval=00:15:90"; |
| 543 | 545 | } |
| 544 | 546 | |
| 545 | 547 | /* #15107 */ |
| … |
… |
node[fire_hydrant:pressure="#"] {
|
| 669 | 671 | assertMatch: "node name=12"; |
| 670 | 672 | assertMatch: "node name=3.5"; |
| 671 | 673 | assertNoMatch: "node name=\"1. Chemnitzer Billardclub 1952 e.V.\""; |
| 672 | | } |
| 673 | | No newline at end of file |
| | 674 | } |