src/Form/Validators/Length.php
protected function prepareError($code)
  {
    $min = $this->getArgValue('min');
    $max = $this->getArgValue('max');
    $error = Translation::get($code);
    $error = str_replace('%min%', $min, $error);
    $error = str_replace('%max%', $max, $error);
    return $error;
  }
protected function prepareError($code)
  {
    $min = $this->getArgValue('min');
    $max = $this->getArgValue('max');
    $error = Translation::get($code);
    $error = str_replace('%min%', $min, $error);
    $error = str_replace('%max%', $max, $error);
    return $error;
  }
Formatte un texte d'erreur

@param string $code  Code erreur (cf. fichier langue formvalidators.ini)
@return string