Changeset 17934 in josm for trunk/resources/data/validator
- Timestamp:
- 2021-06-21T17:32:59+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/resources/data/validator/numeric.mapcss
r17268 r17934 29 29 } 30 30 31 *[building:levels][building:levels !~ /^(([0-9]|[1-9][0-9]*)(\.5)?)$/], 31 /* negative values, #21026 */ 32 *[building:levels^="-"] { 33 throwError: tr("negative {0} value", "{0.key}"); 34 set negative_value; 35 assertMatch: "node building:levels=-1"; 36 assertNoMatch: "node building:levels=+1"; 37 assertNoMatch: "node building:levels=1"; 38 assertNoMatch: "node building:levels=foo"; 39 assertMatch: "node building:levels=-foo"; 40 assertNoMatch: "node level=-1"; 41 } 42 43 *[building:levels][building:levels !~ /^(([0-9]|[1-9][0-9]*)(\.5)?)$/]!.negative_value, 32 44 *[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 separated by a ; */ 33 45 throwWarning: tr("{0} should have numbers only with optional .5 increments", "{0.key}"); … … 223 235 *[width ][width !~ /^(([0-9]+(\.[0-9]+)?( (m|ft))?)|([0-9]+\'([0-9]+(\.[0-9]+)?\")?))$/]!.width_separator_autofix!.width_meter_autofix!.width_foot_autofix, 224 236 *[maxwidth ][maxwidth !~ /^(([0-9]+(\.[0-9]+)?( (m|ft))?)|([0-9]+\'([0-9]+(\.[0-9]+)?\")?))$/]!.maxwidth_separator_autofix!.maxwidth_meter_autofix!.maxwidth_foot_autofix { 225 throwWarning: tr("unusual value of {0}: meters is default; point is decimal separator; if units, put space then unit", "{0.key}");237 throwWarning: tr("unusual value of {0}: {1} is default; only positive values; point is decimal separator; if units, put space then unit", "{0.key}", "meters"); 226 238 assertMatch: "node height=medium"; 227 239 assertMatch: "node maxheight=-5"; … … 269 281 *[maxaxleload][maxaxleload !~ /^([0-9]+(\.[0-9]+)?( (t|kg|st|lbs))?)$/]!.maxaxleload_separator_autofix, 270 282 *[maxweight][maxweight !~ /^([0-9]+(\.[0-9]+)?( (t|kg|st|lbs))?)$/]!.maxweight_separator_autofix { 271 throwWarning: tr("unusual value of {0}: tonne is default; point is decimal separator; if units, put space then unit", "{0.key}");283 throwWarning: tr("unusual value of {0}: {1} is default; only positive values; point is decimal separator; if units, put space then unit", "{0.key}", "tonne"); 272 284 assertMatch: "node maxaxleload=something"; 273 285 assertMatch: "node maxweight=-5"; … … 280 292 way[maxspeed:forward][maxspeed:forward !~ /^(signals|none|unposted|variable|walk|[1-9][0-9]*( [a-z]+)?|[A-Z][A-Z]:(urban|rural|living_street|motorway))$/], 281 293 way[maxspeed:backward][maxspeed:backward !~ /^(signals|none|unposted|variable|walk|[1-9][0-9]*( [a-z]+)?|[A-Z][A-Z]:(urban|rural|living_street|motorway))$/] { 282 throwWarning: tr("unusual value of {0} ", "{0.key}");294 throwWarning: tr("unusual value of {0}: {1} is default; only positive values; point is decimal separator; if units, put space then unit", "{0.key}", "km/h"); 283 295 assertMatch: "way maxspeed=something"; 284 296 assertMatch: "way maxspeed=-50"; … … 307 319 } 308 320 *[distance][distance !~ /^(([0-9]+(\.[0-9]+)?( (m|km|mi|nmi))?)|([0-9]+\'([0-9]+(\.[0-9]+)?\")?))$/]!.distance_separator_autofix { 309 throwWarning: tr("unusual value of {0}: kilometers is default; point is decimal separator; if units, put space then unit", "{0.key}");321 throwWarning: tr("unusual value of {0}: {1} is default; only positive values; point is decimal separator; if units, put space then unit", "{0.key}", "kilometers"); 310 322 assertMatch: "way distance=something"; 311 323 assertMatch: "way distance=-5";
Note:
See TracChangeset
for help on using the changeset viewer.