public function validTags($value)
    {
        $validator = new TagValidator;
        $messages = [];

        foreach ($value as $tag) {
            $errors = $validator->errors($tag);

            if (!empty($errors['tag'])) {
                foreach ($errors['tag'] as $error) {
                    $messages[] = __d('me_cms', 'Tag "{0}": {1}', $tag['tag'], lcfirst($error));
                }
            }
        }

        return empty($messages) ?: implode(PHP_EOL, $messages);
    }
public function validTags($value)
    {
        $validator = new TagValidator;
        $messages = [];

        foreach ($value as $tag) {
            $errors = $validator->errors($tag);

            if (!empty($errors['tag'])) {
                foreach ($errors['tag'] as $error) {
                    $messages[] = __d('me_cms', 'Tag "{0}": {1}', $tag['tag'], lcfirst($error));
                }
            }
        }

        return empty($messages) ?: implode(PHP_EOL, $messages);
    }
public function validTags ( $ value ) { $ validator = new TagValidator ; $ messages = [ ] ; foreach ( $ value as $ tag ) { $ errors = $ validator -> errors ( $ tag ) ; if ( ! empty ( $ errors [ 'tag' ] ) ) { foreach ( $ errors [ 'tag' ] as $ error ) { $ messages [ ] = __d ( 'me_cms' , 'Tag "{0}": {1}' , $ tag [ 'tag' ] , lcfirst ( $ error ) ) ; } } } return empty ( $ messages ) ? : implode ( PHP_EOL , $ messages ) ; }
Tags validation method.

It uses the `TagValidator` and checks its rules on each tag and returns
`true` on success or a string with all a string with all errors found
(separated by `PHP_EOL`) on failure.
@param string $value Field value
@return bool|string `true` on success or an error message on failure
@since 2.26.1
@uses \MeCms\Model\Validation\TagValidator
Tags validation method .