metanorma / pubid-iec

PubID spec and implementation for IEC deliverables
BSD 2-Clause "Simplified" License
2 stars 0 forks source link

ISO/IEC: throw `HarmonizedStageCodeInvalidError` if stage code is not allowed #113

Closed ronaldtse closed 1 year ago

ronaldtse commented 1 year ago

I think we need to implement a list that says what stages are not allowed: https://www.iso.org/files/live/sites/isoorg/files/developing_standards/docs/en/stage_codes.pdf

All these empty boxes should not be allowed to be used to create stages:

Screenshot 2023-06-24 at 10 40 54 AM

If someone attempts to use those stages, a HarmonizedStageCodeInvalidError should definitely be thrown.

Originally posted by @ronaldtse in https://github.com/metanorma/pubid-iec/issues/112#issuecomment-1605240312

mico commented 1 year ago

@ronaldtse this is already implemented here https://github.com/metanorma/pubid-core/blob/main/spec/pubid_core/harmonized_stage_code_spec.rb#L60-L72

ronaldtse commented 1 year ago

Thank you @mico !