private function validateFolder(FolderInterface $folder)
    {
        $errorList = $this->get('validator')->validate($folder);
        if ($errorList->count()) {
            return $errorList->get(0)->getMessage();
        }
        return true;
    }
private function validateFolder(FolderInterface $folder)
    {
        $errorList = $this->get('validator')->validate($folder);
        if ($errorList->count()) {
            return $errorList->get(0)->getMessage();
        }
        return true;
    }
private function validateFolder ( FolderInterface $ folder ) { $ errorList = $ this -> get ( 'validator' ) -> validate ( $ folder ) ; if ( $ errorList -> count ( ) ) { return $ errorList -> get ( 0 ) -> getMessage ( ) ; } return true ; }
Validates the folder.

@param FolderInterface $folder

@return true|string
Validates the folder .