11655: show warning if invalid ref:REI input tag is found
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
@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 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
@tordans Can tagging schema support such validations? Do we have any such formats specified there?
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.