title: 'Conditional Image'
fields:
  -
    handle: image
    field: image.image
    config:
      validate:
        - sometimes
        - required
      if:
        set_type: 'equals image'
  -
    handle: image_caption
    field: image.image_caption
    config:
      if:
        set_type: 'equals image'
  -
    handle: image_caption_text
    field: image.image_caption_text
    config:
      validate:
        - sometimes
        - 'required_with:image_caption'
      if:
        set_type: 'equals image'
        image_caption: 'equals true'
