methods:
  post:
    - "promotion{percent}"
    - "promotion{begin_date}"
    - "promotion{end_date}"

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

names:
  promotion{percent}:
    required:      true
    required_msg:  Pourcentage obligatoire
    validators:    [MyPercentValidator]

  promotion{begin_date}:
    required:      false
    validators:    [MyDateValidator]

  promotion{end_date}:
    required:      false
    validators:    [MyDateValidator]

MyPercentValidator:
    class:         sfNumberValidator
    param:
        nan_error: Merci d'entrer un nombre
        min:       0.1
        min_error: La valeur doit &ecirc;tre sup&eacute;rieure &agrave; 0

MyDateValidator:
    class:         sfDateValidator
    param:
      date_error:  La date n'a pas un format valide
      culture:     fr_FR