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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.