public function validated()
    {
        if ($this->invalid()) {
            throw new ValidationException($this);
        }

        $results = [];

        $missingValue = Str::random(10);

        foreach (array_keys($this->getRules()) as $key) {
            $value = data_get($this->getData(), $key, $missingValue);

            if ($value !== $missingValue) {
                Arr::set($results, $key, $value);
            }
        }

        return $results;
    }
public function validated()
    {
        if ($this->invalid()) {
            throw new ValidationException($this);
        }

        $results = [];

        $missingValue = Str::random(10);

        foreach (array_keys($this->getRules()) as $key) {
            $value = data_get($this->getData(), $key, $missingValue);

            if ($value !== $missingValue) {
                Arr::set($results, $key, $value);
            }
        }

        return $results;
    }
public function validated ( ) { if ( $ this -> invalid ( ) ) { throw new ValidationException ( $ this ) ; } $ results = [ ] ; $ missingValue = Str :: random ( 10 ) ; foreach ( array_keys ( $ this -> getRules ( ) ) as $ key ) { $ value = data_get ( $ this -> getData ( ) , $ key , $ missingValue ) ; if ( $ value !== $ missingValue ) { Arr :: set ( $ results , $ key , $ value ) ; } } return $ results ; }
Get the attributes and values that were validated.

@return array

@throws \Illuminate\Validation\ValidationException
Get the attributes and values that were validated .