Changeset 11640 in josm for trunk/data/validator
- Timestamp:
- 2017-02-28T21:38:41+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/data/validator/numeric.mapcss
r11338 r11640 23 23 assertNoMatch: "node layer=0"; 24 24 assertNoMatch: "node layer=2"; 25 assertNoMatch: "node layer=+5"; 25 assertNoMatch: "node layer=+5"; /* this is an invalid value, but this case is already covered by the previous rule */ 26 26 } 27 27 28 28 *[building:levels][building:levels !~ /^(([0-9]|[1-9][0-9]*)(\.5)?)$/], 29 *[level][level !~ /^((( [0-9]|-[1-9])|[1-9][0-9]*)(\.5)?)(;(([0-9]|-[1-9])|[1-9][0-9]*)(\.5)?)*$|^-0\.5$/] {29 *[level][level !~ /^((((-*[1-9]|[0-9])|-*[1-9][0-9]*)(\.5)?)|-0\.5)(;((((-*[1-9]|[0-9])|-*[1-9][0-9]*)(\.5)?)|-0\.5))*$/] { /* all numbers from -∞ to ∞ in 0.5 steps, optional multiple values seperated by a ; */ 30 30 throwWarning: tr("{0} should have numbers only with optional .5 increments", "{0.key}"); 31 31 assertMatch: "node level=one"; 32 assertMatch: "node level=01"; 33 assertMatch: "node level=-03"; 34 assertMatch: "node level=-01.5"; 35 assertMatch: "node level=2.3"; 36 assertMatch: "node level=-0"; 32 37 assertNoMatch: "node level=0"; 33 38 assertNoMatch: "node level=1"; … … 35 40 assertNoMatch: "node level=-0.5"; 36 41 assertNoMatch: "node level=1.5"; 42 assertNoMatch: "node level=12"; 43 assertNoMatch: "node level=0;1"; 44 assertNoMatch: "node level=1;1.5"; 45 assertNoMatch: "node level=1;0.5"; 46 assertNoMatch: "node level=0;-0.5"; 47 assertNoMatch: "node level=-0.5;0"; 48 assertNoMatch: "node level=-1;-0.5"; 37 49 assertNoMatch: "node building:levels=1.5"; 38 50 assertMatch: "node building:levels=-1"; 39 assertNoMatch: "node building:levels=0"; 51 assertNoMatch: "node building:levels=0"; /* valid because there can be building:levels:underground > 0 or roof:levels > 0 */ 40 52 } 41 53
Note:
See TracChangeset
for help on using the changeset viewer.