Closed justinlittman closed 2 years ago
@arcadiafalcone Can you provide some examples?
Correct:
{ title: [ {
value: "A title",
type: "uniform",
note: [ { value: "Smith, John",
type: "associated name" } ] } ],
contributor: [ {
name: [ { value: "Smith, John" } ] } ] }
Incorrect:
{ title: [ {
value: "A title",
type: "uniform",
note: [ { value: "Smith, John",
type: "associated name" } ] } ],
contributor: [ {
name: [ { value: "Smith, John A." } ] } ] }
Also incorrect:
{ title: [ {
value: "A title",
type: "uniform",
note: [ { value: "Smith, John",
type: "associated name" } ] } ],
contributor: [ ] }
For more complex patterns where structuredValue is involved, see uniform title specs in https://github.com/sul-dlss/dor-services-app/blob/name-title-groups-2/spec/services/cocina/mapping/descriptive/mods/title_info_spec.rb.
Create a new validator that validates that when title.note with type "associated name" has a value, it must match a contributor name.
When there is a mismatch, it should raise a validation error with the message "Missing data: Name associated with uniform title does not match any contributor."
refs https://github.com/sul-dlss/argo/issues/3375