protected function check(UserFilterBuilder $ufb) { if ($ufb->blank($this->envfield)) { $this->empty = true; return true; } $value = $ufb->t($this->envfield); $values = explode("\n", $value); $ids = array(); foreach ($values as $val) { $val = trim($val); if (preg_match('/^[0-9A-Z]{0,8}$/', $val)) { $ids[] = $val; } } if (count($ids) == 0) { return $this->raise("Le champ %s ne contient aucune valeur valide."); } $this->reversed = $ufb->b($this->reversed_envfield); $this->val = $ids; return true; }