Changeset 8730 in josm for trunk/data


Ignore:
Timestamp:
2015-09-04T21:32:36+02:00 (9 years ago)
Author:
Klumbumbus
Message:

fix #11491 - add/enhance validator rules for postcode/postal_code/addr:postcode

Location:
trunk/data/validator
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/validator/combinations.mapcss

    r8700 r8730  
    206206}
    207207
    208 /* see #9811 */
     208/* see #9811, #11491 */
    209209*[place][place!=farm][/^addr:/],
    210210*[boundary][/^addr:/],
    211 *[highway][/^addr:/][highway!=services][highway!=rest_area] {
     211*[highway][/^addr:/][highway!=services][highway!=rest_area][!"addr:postcode"] {
    212212  throwWarning: tr("{0} together with addr:*", "{0.key}");
     213}
     214*[!highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {
     215  throwWarning: tr("{0} together with {1}", "{1.key}", "{2.key}");
     216}
     217*[!highway][postal_code]["addr:postcode"][postal_code!=*"addr:postcode"] {
     218  throwWarning: tr("{0} together with {1} and conflicting values", "{1.key}", "{2.key}");
     219}
     220way[highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {
     221  throwWarning: tr("{0} together with {1}", "{1.key}", "{2.key}");
     222  fixRemove: "addr:postcode";
     223}
     224way[highway][postal_code]["addr:postcode"][postal_code!=*"addr:postcode"] {
     225  throwWarning: tr("{0} together with {1} and conflicting values", "{1.key}", "{2.key}");
     226}
     227way[highway][!postal_code]["addr:postcode"] {
     228  throwWarning: tr("{0} together with {1}", "{0.key}", "{2.key}");
     229  suggestAlternative: "postal_code";
     230  fixChangeKey: "addr:postcode=>postal_code";
    213231}
    214232
  • trunk/data/validator/deprecated.mapcss

    r8725 r8730  
    529529  fixChangeKey: "pk => distance";
    530530}
     531
     532*[postcode] {
     533  throwWarning: tr("{0} is deprecated", "{0.key}");
     534  suggestAlternative: "addr:postcode";
     535  suggestAlternative: "postal_code";
     536}
Note: See TracChangeset for help on using the changeset viewer.