methods:
  post:
    - image_file_name1
    - image_file_name2
    - image_file_name3
    - image_file_name4
    - image_file_name5
    - image_file_name6
    - link_ad1
    - link_ad2
    - link_ad3
    - link_ad4
    - link_ad5
    - link_ad6

fillin:
  enabled: true
  param:
   check_types:     [text, textarea, radio, hidden, checkbox, select]

names:
  image_file_name1:
    required:      false
    file:          true
    validators:    [MyImageValidator]

  image_file_name2:
    required:      false
    file:          true
    validators:    [MyImageValidator]

  image_file_name3:
    required:      false
    file:          true
    validators:    [MyImageValidator]

  image_file_name4:
    required:      false
    file:          true
    validators:    [MyImageValidator]

  image_file_name5:
    required:      false
    file:          true
    validators:    [MyImageValidator]

  image_file_name6:
    required:      false
    file:          true
    validators:    [MyImageValidator]

  link_ad1:
    required:      false
    validators:    [MyLinkValidator]

  link_ad2:
    required:      false
    validators:    [MyLinkValidator]

  link_ad3:
    required:      false
    validators:    [MyLinkValidator]

  link_ad4:
    required:      false
    validators:    [MyLinkValidator]

  link_ad5:
    required:      false
    validators:    [MyLinkValidator]

  link_ad6:
    required:      false
    validators:    [MyLinkValidator]

MyImageValidator:
    class:         sfFileValidator
    param:
        mime_types:
          - 'image/jpeg'
          - 'image/jpg'
          - 'image/pjpeg'
          - 'image/pjpg'
        mime_types_error: Fichiers JPG uniquement
        max_size:         1536000
        max_size_error:   Taille maximale de 1,5Mo

MyLinkValidator:
    class:          sfRegexValidator
    param:
      match:        Yes
      match_error:  Renseignez un champ de la forme "http://www.unsite.com/"
      pattern:      /http:\/\//