public function fullClean($exclude = [])
    {
        $errors = [];

        try {
            $this->cleanFields($exclude);
        } catch (ValidationError $error) {
            //todo
        }

        try {
            $this->clean();
        } catch (ValidationError $error) {
            //todo
        }
        if (!empty($errors)) {
            throw new ValidationError($errors);
        }
    }
public function fullClean($exclude = [])
    {
        $errors = [];

        try {
            $this->cleanFields($exclude);
        } catch (ValidationError $error) {
            //todo
        }

        try {
            $this->clean();
        } catch (ValidationError $error) {
            //todo
        }
        if (!empty($errors)) {
            throw new ValidationError($errors);
        }
    }
public function fullClean ( $ exclude = [ ] ) { $ errors = [ ] ; try { $ this -> cleanFields ( $ exclude ) ; } catch ( ValidationError $ error ) { //todo } try { $ this -> clean ( ) ; } catch ( ValidationError $ error ) { //todo } if ( ! empty ( $ errors ) ) { throw new ValidationError ( $ errors ) ; } }
Calls cleanFields, clean on the model and throws a ``ValidationError`` for any errors that occurred.

@param array $exclude

@throws ValidationError
@author: Eddilbert Macharia (http://eddmash.com)<edd.cowan@gmail.com>
Calls cleanFields clean on the model and throws a ValidationError for any errors that occurred .