public function validate() {
        $status = new ValidationResult();

        // Check if the form is loaded
        if (!$this->form instanceof \bootbuilder\Form) {
            $status->setError(true);
            return $status;
        }

        // Validate form controls (and panes)
        foreach ($this->form->getRawControls() as $nr => $control) {
            if(!$this->validateControl($control, $status)) {
                $status->setError(true);
                $control->setErrorState(true);
            }
            
            $this->form->replaceControl($nr, $control);
        }
        
        return $status;
    }
public function validate() {
        $status = new ValidationResult();

        // Check if the form is loaded
        if (!$this->form instanceof \bootbuilder\Form) {
            $status->setError(true);
            return $status;
        }

        // Validate form controls (and panes)
        foreach ($this->form->getRawControls() as $nr => $control) {
            if(!$this->validateControl($control, $status)) {
                $status->setError(true);
                $control->setErrorState(true);
            }
            
            $this->form->replaceControl($nr, $control);
        }
        
        return $status;
    }
public function validate ( ) { $ status = new ValidationResult ( ) ; // Check if the form is loaded if ( ! $ this -> form instanceof \ bootbuilder \ Form ) { $ status -> setError ( true ) ; return $ status ; } // Validate form controls (and panes) foreach ( $ this -> form -> getRawControls ( ) as $ nr => $ control ) { if ( ! $ this -> validateControl ( $ control , $ status ) ) { $ status -> setError ( true ) ; $ control -> setErrorState ( true ) ; } $ this -> form -> replaceControl ( $ nr , $ control ) ; } return $ status ; }
Validate the form controls, validates by the required status, and some specific control validations
such as email control
@return \bootbuilder\Validation\ValidationResult
Validate the form controls validates by the required status and some specific control validations such as email control