@cid, @date_publi & @date_signature are now optional in LegiArticle.CONTEXTE.TEXTE
This commit is contained in:
parent
47c0a0017d
commit
50691e6da1
2 changed files with 4 additions and 14 deletions
|
@ -579,6 +579,7 @@ function auditTexte(audit: Audit, dataUnknown: unknown): [unknown, unknown] {
|
|||
const remainingKeys = new Set(Object.keys(data))
|
||||
for (const key of [
|
||||
"@autorite",
|
||||
"@cid",
|
||||
"@ministere",
|
||||
"@nor",
|
||||
"@num",
|
||||
|
@ -594,16 +595,6 @@ function auditTexte(audit: Audit, dataUnknown: unknown): [unknown, unknown] {
|
|||
auditEmptyToNull,
|
||||
)
|
||||
}
|
||||
audit.attribute(
|
||||
data,
|
||||
"@cid",
|
||||
true,
|
||||
errors,
|
||||
remainingKeys,
|
||||
auditTrimString,
|
||||
auditEmptyToNull,
|
||||
auditRequire,
|
||||
)
|
||||
for (const key of ["@date_publi", "@date_signature"]) {
|
||||
audit.attribute(
|
||||
data,
|
||||
|
@ -613,7 +604,6 @@ function auditTexte(audit: Audit, dataUnknown: unknown): [unknown, unknown] {
|
|||
remainingKeys,
|
||||
auditFunction((date) => date.replace(/^11992-12-27$/, "1992-12-27")),
|
||||
auditDateIso8601String,
|
||||
auditRequire,
|
||||
)
|
||||
}
|
||||
audit.attribute(
|
||||
|
|
|
@ -7,9 +7,9 @@ export interface LegiArticle {
|
|||
CONTEXTE: {
|
||||
TEXTE: {
|
||||
"@autorite"?: string
|
||||
"@cid": string
|
||||
"@date_publi": string
|
||||
"@date_signature": string
|
||||
"@cid"?: string
|
||||
"@date_publi"?: string
|
||||
"@date_signature"?: string
|
||||
"@ministere"?: string
|
||||
"@nature"?: LegiArticleTexteNature
|
||||
"@nor"?: string
|
||||
|
|
Loading…
Reference in a new issue