public function validate(PortableElementObject $object, $source=null, $validationGroup=array())
    {
        $validator = $object->getModel()->getValidator();
        Validator::validate($object, $validator, $validationGroup);
        if ($source) {
            $validator->validateAssets($object, $source);
        }
    }
public function validate(PortableElementObject $object, $source=null, $validationGroup=array())
    {
        $validator = $object->getModel()->getValidator();
        Validator::validate($object, $validator, $validationGroup);
        if ($source) {
            $validator->validateAssets($object, $source);
        }
    }
public function validate ( PortableElementObject $ object , $ source = null , $ validationGroup = array ( ) ) { $ validator = $ object -> getModel ( ) -> getValidator ( ) ; Validator :: validate ( $ object , $ validator , $ validationGroup ) ; if ( $ source ) { $ validator -> validateAssets ( $ object , $ source ) ; } }
Validate a model using associated validator

@param PortableElementObject $object
@param null $source Directory of portable element, if not null it will be checked
@param array $validationGroup Fields to be checked, empty=$validator->getConstraints()
@return bool
@throws PortableElementInconsistencyModelException
Validate a model using associated validator