methods:
  post:
    - "attribute_price{price_ttc_up}"
    - "attribute_price{field1}"
    - "attribute_price{field2}"

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

names:
  attribute_price{price_ttc_up}:
    required:      true
    required_msg:  Prix obligatoire
    validators:    [MyPriceValidator]

  attribute_price{field1}:
    required:      true
    required_msg:  Borne inf&eacute;rieure obligatoire
    validators:    [MyNbCharacterValidator, MyBoundaryInfValidator]

  attribute_price{field2}:
    required:      true
    required_msg:  Borne sup&eacute;rieure obligatoire
    validators:    [MyNbCharacterValidator, MyInfSupValidator, MyBoundarySupValidator]

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

MyNbCharacterValidator:
    class:         sfRegexValidator
    param:
        match:         Yes
        match_error:   La valeur doit &ecirc;tre un entier positif
        pattern:       /[0-9]+/
        # ce pattern ne fonctionne pas compl�tement 

MyInfSupValidator:
    class:             MyCompareValidator
    param:
      inf:             attribute_price[field1]
      sup:             attribute_price[field2]
      infsup_error:    La borne doit &ecirc;tre sup&eacute;rieure ou &eacute;gale &agrave; la borne inf&eacute;rieure

MyBoundaryInfValidator:
    class:             MyBoundaryValidator
    param:
      prev:            prev
      next:            
      min_error:       La borne doit &ecirc;tre de %s caract&egrave;res
      max_error:       La borne doit &ecirc;tre de %s caract&egrave;res

MyBoundarySupValidator:
    class:             MyBoundaryValidator
    param:
      prev:            
      next:            next
      min_error:       La borne doit &ecirc;tre de %s caract&egrave;res
      max_error:       La borne doit &ecirc;tre de %s caract&egrave;res