iD icon indicating copy to clipboard operation
iD copied to clipboard

11655: show warning if invalid ref:REI input tag is found

Open ankushKun opened this issue 2 weeks ago • 4 comments

Implements #11655

Added REI tag validation logic to modules/validations/invalid_format.js Added en localization for the same to data/core.yaml

When an invalid value is entered to a ref:REI tag, a warning is displayed to the user

Valid formats: A string of length 8 characters 00000000 or in the format 00-00-0000

image

ankushKun avatar Dec 08 '25 14:12 ankushKun

@ankushKun please review the codebase on how alerts like this are handled. IMO you will find that we do not add them on a tag by tag basis manually deep in the code but instead search for abstractions like id-tagging-schema and similar.

tordans avatar Dec 08 '25 14:12 tordans

@tordans should I be adding the ref:REI tag to https://github.com/openstreetmap/id-tagging-schema first? since I cannot find it anywhere in the current codebases

ankushKun avatar Dec 08 '25 15:12 ankushKun

@tordans Can tagging schema support such validations? Do we have any such formats specified there?

matkoniecz avatar Dec 09 '25 10:12 matkoniecz

Valid formats: A string of length 8 characters 00000000 or in the format 00-00-0000

The REI reference doesn't include dashes, so the only valid format should be an 8 character string. More precise validations could be added (e.g. the first three characters are always letters), but even a simple length check would already be useful.

ivanbranco avatar Dec 09 '25 12:12 ivanbranco