Welcome Guest, Not a member yet? Register   Sign In
Get partial validated data
#1

Hi, I have a question. How can I retrieve partially validated data from a validation process?

I would like to perform parallel processing: saving some data while displaying error messages for the parts that failed validation. 

I have the following code but didn't work, Any help would be greatly appreciated.

PHP Code:
if (!$this->validate($rules)) {
            $cleanData $this->validator->getValidated();
            dd($cleanData); // no data?
            $this->savePartial($cleanData);

            $errors $this->validator->getErrors();
            $error array_shift($errors);

            return $this->respond(['messages' => $this->alert(
                text$error,
                type'warning',
            )]);
        
@xxxx[{::::::::::::::::::::::::::::::::>
Reply
#2

There is no method.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB