Changeset 17268 in josm
- Timestamp:
- 2020-10-26T16:14:48+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/resources/data/validator/numeric.mapcss
r17267 r17268 55 55 } 56 56 57 *[height][height =~ /^[0-9]+ \.?[0-9]*(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] {57 *[height][height =~ /^[0-9]+(\.[0-9]+)?(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] { 58 58 throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}"); 59 59 set height_meter_autofix; … … 65 65 assertNoMatch: "node height=5"; 66 66 } 67 *[height][height =~ /^[0-9]+ \.?[0-9]*(( )*(foot|Foot|feet|Feet)|ft)$/] {67 *[height][height =~ /^[0-9]+(\.[0-9]+)?(( )*(foot|Foot|feet|Feet)|ft)$/] { 68 68 throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}"); 69 69 set height_foot_autofix; … … 88 88 } 89 89 90 *[maxheight][maxheight =~ /^[1-9][0-9]* \.?[0-9]*(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] {90 *[maxheight][maxheight =~ /^[1-9][0-9]*(\.[0-9]+)?(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] { 91 91 throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}"); 92 92 set maxheight_meter_autofix; … … 98 98 assertNoMatch: "node maxheight=5"; 99 99 } 100 *[maxheight][maxheight =~ /^[0-9]+ \.?[0-9]*(( )*(foot|Foot|feet|Feet)|ft)$/] {100 *[maxheight][maxheight =~ /^[0-9]+(\.[0-9]+)?(( )*(foot|Foot|feet|Feet)|ft)$/] { 101 101 throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}"); 102 102 set maxheight_foot_autofix; … … 121 121 } 122 122 123 *[maxlength][maxlength =~ /^[1-9][0-9]* \.?[0-9]*(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] {123 *[maxlength][maxlength =~ /^[1-9][0-9]*(\.[0-9]+)?(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] { 124 124 throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}"); 125 125 set maxlength_meter_autofix; … … 131 131 assertNoMatch: "node maxlength=5"; 132 132 } 133 *[maxlength][maxlength =~ /^[0-9]+ \.?[0-9]*(( )*(foot|Foot|feet|Feet)|ft)$/] {133 *[maxlength][maxlength =~ /^[0-9]+(\.[0-9]+)?(( )*(foot|Foot|feet|Feet)|ft)$/] { 134 134 throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}"); 135 135 set maxlength_foot_autofix; … … 154 154 } 155 155 156 *[width][width =~ /^[0-9]+ \.?[0-9]*(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] {156 *[width][width =~ /^[0-9]+(\.[0-9]+)?(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] { 157 157 throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}"); 158 158 set width_meter_autofix; … … 164 164 assertNoMatch: "node width=5"; 165 165 } 166 *[width][width =~ /^[0-9]+ \.?[0-9]*(( )*(foot|Foot|feet|Feet)|ft)$/] {166 *[width][width =~ /^[0-9]+(\.[0-9]+)?(( )*(foot|Foot|feet|Feet)|ft)$/] { 167 167 throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}"); 168 168 set width_foot_autofix; … … 186 186 } 187 187 188 *[maxwidth][maxwidth=~ /^[0-9]+ \.?[0-9]*(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] {188 *[maxwidth][maxwidth=~ /^[0-9]+(\.[0-9]+)?(( )*(metre|metres|meter|meters|Metre|Metres|Meter|Meters)|m)$/] { 189 189 throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}"); 190 190 set maxwidth_meter_autofix; … … 196 196 assertNoMatch: "node maxwidth=5"; 197 197 } 198 *[maxwidth][maxwidth =~ /^[0-9]+ \.?[0-9]*(( )*(foot|Foot|feet|Feet)|ft)$/] {198 *[maxwidth][maxwidth =~ /^[0-9]+(\.[0-9]+)?(( )*(foot|Foot|feet|Feet)|ft)$/] { 199 199 throwWarning: tr("unusual value of {0}: use abbreviation for unit and space between value and unit", "{0.key}"); 200 200 set maxwidth_foot_autofix; … … 306 306 assertNoMatch: "node distance=4"; 307 307 } 308 *[distance][distance !~ /^(([0-9]+(\.[0-9]+)?( (m|km|mi|nmi))?)|([0-9]+\' [0-9]+\.?[0-9]*\"))$/]!.distance_separator_autofix {308 *[distance][distance !~ /^(([0-9]+(\.[0-9]+)?( (m|km|mi|nmi))?)|([0-9]+\'([0-9]+(\.[0-9]+)?\")?))$/]!.distance_separator_autofix { 309 309 throwWarning: tr("unusual value of {0}: kilometers is default; point is decimal separator; if units, put space then unit", "{0.key}"); 310 310 assertMatch: "way distance=something";
Note:
See TracChangeset
for help on using the changeset viewer.