Validate form on click to MultiUpload

Notice: This thread is very old.
lukendo
Member | 96
+
0
-

Hi, in my form a i had a MultiUpload. When a i click on this control, form calls a onValidate function. But I used a setValidationScope(FALSE), but issue is still active. Can you help me please, where is a problem? Thanks.

$form->addText('path')->setAttribute('placeholder', "path of files")->getControlPrototype()->id('uploadFile')->setValidationScope(FALSE);
        $form->addMultiUpload('files')->getControlPrototype()->id('uploadBtn')->class('upload')->setValidationScope(FALSE);
$form->onValidate[] = [$this, 'validateForm'];
public function validateForm($form)
{
        if ($form->submitted->getValidationScope() === NULL) { ... }
}

Tracy:

Call to a member function getValidationScope() on a non-object