---
auto_fieldset: 1

elements:
  - type: Hidden
    name: id
  
  - type: Text
    name: name
  
  - type: Repeatable
    nested_name: addresses
    counter_name: count
    model_config:
      empty_rows: 2
    
    elements:
      - type: Hidden
        name: id
      
      - type: Text
        name: address
        constraints:
            - type: Required
              when:
                field: 'addresses.id'
  
  - type: Hidden
    name: count
  
  - type: Submit
    name: submit

