/** * {@inheritdoc} */ public function validate(&$value, \sndsgd\form\Validator $validator = null) : bool { $file = \sndsgd\Fs::file($value); $extension = strtolower($file->getExtension()); if (!in_array($extension, $this->extensions)) { return false; } return true; }