dag-hammarskjold-library / dlx-rest

UNDHL Files and Metadata Manager
1 stars 1 forks source link

Add new field in validation file #1458

Closed JoelleSciboz closed 2 months ago

JoelleSciboz commented 3 months ago

We need the following field added to the validation file for bibliographic records. Subfield a and f should allow only some values, Subfield g should be a date yyy-mm-dd

"506": { "name": "Access restriction note", "required": false,
"repeatable": false, "validIndicators1": [], "validIndicators2": [], "requiredSubfields": [], "validSubfields": ["a", "b", "f", "g"], "defaultSubfields": ["a", "b", "f"], "validStrings": { "a": ["Restricted distribution","Confidential","Embargoed","Withdrawn","De-restricted"], "f: ["Access limited to authorized users", "Access limited on-site", "Access limited on-site and to authorized users"] }, "_validRegex": { "g": ["^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$"] // should be a date yyyy-mm-dd check my regex. }, "isDate": { "g": true } }