src/Dashboard/Widgets/SharpWidget.php
protected function validate(array $properties)
    {
        $validator = Validator::make($properties, [
                'key' => 'required',
                'type' => 'required',
            ] + $this->validationRules());

        if ($validator->fails()) {
            throw new SharpWidgetValidationException($validator->errors());
        }
    }
protected function validate(array $properties)
    {
        $validator = Validator::make($properties, [
                'key' => 'required',
                'type' => 'required',
            ] + $this->validationRules());

        if ($validator->fails()) {
            throw new SharpWidgetValidationException($validator->errors());
        }
    }
protected function validate ( array $ properties ) { $ validator = Validator :: make ( $ properties , [ 'key' => 'required' , 'type' => 'required' , ] + $ this -> validationRules ( ) ) ; if ( $ validator -> fails ( ) ) { throw new SharpWidgetValidationException ( $ validator -> errors ( ) ) ; } }
Throw an exception in case of invalid attribute value.

@param array $properties
@throws SharpWidgetValidationException
Throw an exception in case of invalid attribute value .