public function onSubmit(FormRuntime $formRuntime, &$elementValue)
    {
        $imageTypeValidator = new ImageTypeValidator(array('allowedTypes' => $this->properties['allowedTypes']));
        $this->addValidator($imageTypeValidator);
    }
public function onSubmit(FormRuntime $formRuntime, &$elementValue)
    {
        $imageTypeValidator = new ImageTypeValidator(array('allowedTypes' => $this->properties['allowedTypes']));
        $this->addValidator($imageTypeValidator);
    }
public function onSubmit ( FormRuntime $ formRuntime , & $ elementValue ) { $ imageTypeValidator = new ImageTypeValidator ( array ( 'allowedTypes' => $ this -> properties [ 'allowedTypes' ] ) ) ; $ this -> addValidator ( $ imageTypeValidator ) ; }
Add ImageTypeValidator just before submitting so that the "allowedTypes" can be changed at runtime

@param FormRuntime $formRuntime
@param mixed $elementValue
@return void
Add ImageTypeValidator just before submitting so that the allowedTypes can be changed at runtime