public function getErrors(DataObject $record)
    {
        $errors = [];

        if (strlen($record->MetaDescription) < 10) {
            $errors[] = 'seo-editor-error-too-short';
        }
        if (strlen($record->MetaDescription) > 160) {
            $errors[] = 'seo-editor-error-too-long';
        }
        if (strlen(SiteTree::get()->filter('MetaDescription', $record->MetaDescription)->count() > 1)) {
            $errors[] = 'seo-editor-error-duplicate';
        }

        return $errors;
    }
public function getErrors(DataObject $record)
    {
        $errors = [];

        if (strlen($record->MetaDescription) < 10) {
            $errors[] = 'seo-editor-error-too-short';
        }
        if (strlen($record->MetaDescription) > 160) {
            $errors[] = 'seo-editor-error-too-long';
        }
        if (strlen(SiteTree::get()->filter('MetaDescription', $record->MetaDescription)->count() > 1)) {
            $errors[] = 'seo-editor-error-duplicate';
        }

        return $errors;
    }
public function getErrors ( DataObject $ record ) { $ errors = [ ] ; if ( strlen ( $ record -> MetaDescription ) < 10 ) { $ errors [ ] = 'seo-editor-error-too-short' ; } if ( strlen ( $ record -> MetaDescription ) > 160 ) { $ errors [ ] = 'seo-editor-error-too-long' ; } if ( strlen ( SiteTree :: get ( ) -> filter ( 'MetaDescription' , $ record -> MetaDescription ) -> count ( ) > 1 ) ) { $ errors [ ] = 'seo-editor-error-duplicate' ; } return $ errors ; }
Get the errors which are specific to MetaDescription

@param DataObject $record
@return array
Get the errors which are specific to MetaDescription