salsadigitalauorg / merlin-framework

Merlin - migration framework
GNU General Public License v3.0
16 stars 3 forks source link

Add mandatory option; e.g require element for row to be valid #72

Closed stooit closed 5 years ago

stooit commented 5 years ago

Fixes #9

As per added docs:

Mandatory element

Some elements may be considered mandatory for a row to be considered valid. For example; if a page does not contain a 'Title' then it may fail a mandatory requirement and be skipped.

This is controlled via the mandatory option against a field. For example:

mappings:
  -
    field: title
    selector: '#content-main h1'
    type: text
    options:
      mandatory: true