Skip to content

Commit

Permalink
fields: Add pattern constraint for BT-1501(s)-Contract (TEDEFO-1964)
Browse files Browse the repository at this point in the history
Also add corresponding schematron rules.
  • Loading branch information
bertrand-lorentz committed Sep 21, 2023
1 parent 44016ca commit ed53761
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fields/fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"ublVersion" : "2.3",
"sdkVersion" : "eforms-sdk-1.10.0-SNAPSHOT",
"metadataDatabase" : {
"version" : "1.9.58",
"createdOn" : "2023-09-19T16:34:47"
"version" : "1.9.60",
"createdOn" : "2023-09-21T11:22:09"
},
"xmlStructure" : [ {
"id" : "ND-Root",
Expand Down Expand Up @@ -5888,6 +5888,10 @@
"severity" : "ERROR"
} ]
},
"pattern" : {
"value" : "^(RESULT|((CON|RES|TEN|TPA|TPO|ORG)-\\d{4}))$",
"severity" : "ERROR"
},
"assert" : {
"value" : "{ND-Root} ${TRUE}",
"severity" : "ERROR",
Expand Down
3 changes: 3 additions & 0 deletions schematrons/dynamic/validation-stage-3b.sch
Original file line number Diff line number Diff line change
Expand Up @@ -2529,6 +2529,9 @@
<rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:ContractModification/efbc:ChangedNoticeIdentifier">
<assert id="BR-BT-01501-0102" role="ERROR" test="matches(normalize-space(.),'^([a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}-(0[1-9]|[1-9]\d)|(\d{1,8})-(19|20)\d\d)$')">rule|text|BR-BT-01501-0102</assert>
</rule>
<rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:ContractModification/efac:Change/efac:ChangedSection/efbc:ChangedSectionIdentifier">
<assert id="BR-BT-01501-0109" role="ERROR" test="matches(normalize-space(.),'^(RESULT|((CON|RES|TEN|TPA|TPO|ORG)-\d{4}))$')">rule|text|BR-BT-01501-0109</assert>
</rule>
<rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:SettledContract/efac:LotTender/cbc:ID">
<assert id="BR-BT-03202-0051" role="ERROR" test="matches(normalize-space(.),'^TEN-\d{4}$')">rule|text|BR-BT-03202-0051</assert>
</rule>
Expand Down
3 changes: 3 additions & 0 deletions schematrons/static/validation-stage-3b.sch
Original file line number Diff line number Diff line change
Expand Up @@ -2529,6 +2529,9 @@
<rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:ContractModification/efbc:ChangedNoticeIdentifier">
<assert id="BR-BT-01501-0102" role="ERROR" test="matches(normalize-space(.),'^([a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}-(0[1-9]|[1-9]\d)|(\d{1,8})-(19|20)\d\d)$')">rule|text|BR-BT-01501-0102</assert>
</rule>
<rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:ContractModification/efac:Change/efac:ChangedSection/efbc:ChangedSectionIdentifier">
<assert id="BR-BT-01501-0109" role="ERROR" test="matches(normalize-space(.),'^(RESULT|((CON|RES|TEN|TPA|TPO|ORG)-\d{4}))$')">rule|text|BR-BT-01501-0109</assert>
</rule>
<rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:SettledContract/efac:LotTender/cbc:ID">
<assert id="BR-BT-03202-0051" role="ERROR" test="matches(normalize-space(.),'^TEN-\d{4}$')">rule|text|BR-BT-03202-0051</assert>
</rule>
Expand Down

0 comments on commit ed53761

Please sign in to comment.