Ticket #11253: josm_11253_validator.patch
| File josm_11253_validator.patch, 2.2 KB (added by , 6 years ago) |
|---|
-
src/org/openstreetmap/josm/resources/data/validator/numeric.mapcss
59 59 assertNoMatch: "node maxheight=16'3\""; 60 60 } 61 61 62 /* maxstay=0 is unclear. Was in presets, see #11253 */ 63 *[maxstay=0] { 64 throwWarning: tr("{0} is unclear.", "maxstay"); 65 suggestAlternative: "maxstay=unlimited or maxstay=no"; 66 assertMatch: "node maxstay=0"; 67 assertMatch: "way maxstay=0"; 68 assertNoMatch: "node maxstay=2"; 69 assertNoMatch: "way maxstay=no"; 70 } 71 72 /* maxstay needs unit. Was in presets without it, see #11253 */ 73 *[maxstay][maxstay !~ /^(([0-9]+\.?[0-9]*( (minute|minutes|hour|hours|h|day|days|d|year|years|a)))|(no|unlimited|0))$/] { 74 throwWarning: tr("{0}: no default unit; only positive values; period is separator; space between value and unit", "maxstay"); 75 assertMatch: "way maxstay=something"; 76 assertMatch: "way maxstay=-5"; 77 assertMatch: "node maxstay=180"; 78 assertMatch: "way maxstay=66minutes"; 79 assertNoMatch: "node maxstay=0"; 80 assertNoMatch: "way maxstay=no"; 81 assertNoMatch: "node maxstay=unlimited"; 82 assertNoMatch: "way maxstay=66 minutes"; 83 assertNoMatch: "way maxstay=2.5 hours"; 84 assertNoMatch: "node maxstay=7 h"; 85 } 86 62 87 way[width][width !~ /^(([0-9]+\.?[0-9]*( [a-z]+)?)|([0-9]+\'([0-9]+\.?[0-9]*\")?))$/] { 63 88 throwWarning: tr("{0}: meters is default; period is separator; if units, put space then unit", "width"); 64 89 assertMatch: "way width=something"; … … 80 105 assertNoMatch: "way maxwidth=2.5"; 81 106 assertNoMatch: "way maxwidth=7 ft"; 82 107 } 108 83 109 way[maxspeed][maxspeed !~ /^(signals|none|unposted|variable|walk|[1-9][0-9]*( [a-z]+)?|[A-Z][A-Z]:(urban|rural|living_street|motorway))$/], 84 110 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))$/], 85 111 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))$/] {
