Changeset 7872 in josm


Ignore:
Timestamp:
2014-12-22T23:17:15+01:00 (5 years ago)
Author:
Klumbumbus
Message:

see #10837 - add numeric lanes validation rule (rule by naoliv); fix names validation rule

Location:
trunk/data/validator
Files:
2 edited

Legend:

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

    r7819 r7872  
    202202}
    203203
    204 /* any other *_name tag but not a name, see #10837 */
    205 *[/_name$/][!name] {
     204/* any other *_name tag (except old_name, loc_name and uic_name) but not a name , see #10837 */
     205*[/_name$/][!name][!old_name][!loc_name][!uic_name] {
    206206  throwWarning: tr("alternative name without {0}", "{1.key}");
    207207}
  • trunk/data/validator/numeric.mapcss

    r6861 r7872  
    140140  throwWarning: tr("{0} must be a numeric value", "{0.key}");
    141141}
     142
     143/* lanes* must be an integer positive number only, see #10837 */
     144way[highway][lanes][lanes !~ /^[1-9]([0-9]*)$/],
     145way[highway]["lanes:backward"]["lanes:backward" !~ /^[1-9]([0-9]*)$/],
     146way[highway]["lanes:forward"]["lanes:forward" !~ /^[1-9]([0-9]*)$/] {
     147  throwError: tr("{0} must be a positive integer number", "{1.key}");
     148  assertMatch: "way lanes=-1";
     149  assertMatch: "way lanes=5.5";
     150  assertMatch: "way lanes=1;2";
     151  assertMatch: "way lanes:forward=-1";
     152  assertMatch: "way lanes:fobackward=-1";
     153  assertNoMatch: "way lanes=1";
     154}
Note: See TracChangeset for help on using the changeset viewer.