data4development / IATI-Rulesets

Various conditional and restraint rules for IATI data
MIT License
0 stars 4 forks source link

identifier_check isn’t run for `iati-activity/iati-identifier` #55

Closed andylolz closed 5 years ago

andylolz commented 5 years ago

In the IATI standard, there’s currently an iati-identifier rule that:

iati-identifier should match the regex [^\/\&|\?]+

Additionally, the iati-identifier overview page of the IATI standard reference site says:

The iati-identifier should have no leading or trailing whitespace.

In this repo, these rules exist in identifier_check for various identifiers, but not for iati-activity/iati-identifier.

This seems like it might be an accidental omission?

rolfkleef commented 5 years ago

An omission indeed, Andy.

andylolz commented 5 years ago

Okay, great – glad this was useful. Thanks for resolving it.

I’m slightly puzzled by one small thing in the fix… Wouldn’t it be better to either check iati-activity/iati-identifier here, or remove this bit?

I guess there is no problem with overlapping rules, but in this case it seems avoidable.

rolfkleef commented 5 years ago

It's a bit due to overlapping work actually: we're removing all version 1.0x checks from the validator still, and that includes the second bit you mention: the iati-organisation/iati-identifier is a v1.0x element.

andylolz commented 5 years ago

Aha – gotcha! Thanks for clarifying.