public function onSubmit(FormRuntime $formRuntime, &$elementValue)
    {
        $imageTypeValidator = new ImageTypeValidator(array('allowedTypes' => $this->properties['allowedTypes']));
        $this->addValidator($imageTypeValidator);
    }