public function validateFormData(WebRequest $request, Response $response, callable $callback = null)
    {
        $form = $this->searchSubmittedForm($request, $response);
        
        if ($form === null) {
            return Form::NOT_SUBMITTED;
        }
        
        // Validate the data
        $errors = $form->validateFormData($this->framework);
        
        // Execute the custom validation method
        if (is_callable($callback)) {
            $callbackErrors = call_user_func_array($callback, array($this->getFormValues()));
            
            if (is_array($callbackErrors)) {
                $errors = array_merge($errors, $callbackErrors);
            }
        }
        
        if (is_array($errors) && count($errors) > 0) {
            $this->updateErrorBox($form, $errors);
            return Form::DATA_INVALID;
        }
        
        return Form::DATA_VALID;
    }