methods:
  post:
    - "category{title}"
    - level
    - image_file_name
    - header_file_name

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

names:
  category{title}:
    required:      true
    required_msg:  Titre obligatoire
    validators:    [MyStringValidator]

  level:
    required:      true
    required_msg:  Niveau obligatoire
    validators:    [MyCategoryLevelValidator]

  image_file_name:
    required:      No
    file:          true
    validators:    [MyImageValidator]

  header_file_name:
    required:      No
    file:          true
    validators:    [MyImageValidator]

MyCategoryLevelValidator:
    class:         MyCategoryLevelValidator
    param:
      id:                    id
      level:                 level
      level1:                level1
      level2:                level2
      category_level_error:  Les niveaux parents s&eacute;lectionn&eacute;s ne sont pas coh&eacute;rents

MyStringValidator:
    class:         sfStringValidator
    param:
        min:       2
        min_error: Merci d'entrer au moins 2 caract&egrave;res
        max:       90
        max_error: Merci d'entrer moins de 90 caract&egrave;res

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