src/Taxonomy/TaxonomyField.php
protected function sanitize(FieldTypeInterface $field)
    {
        return function ($value, $key, $type) use ($field) {
            $validator = $this->validator->make(
                [$key => $value],
                $this->getTermRules(),
                $this->getTermMessages(),
                $this->getTermPlaceholders()
            );

            $validation = $validator->valid();

            return $validation[$key] ?? null;
        };
    }
protected function sanitize(FieldTypeInterface $field)
    {
        return function ($value, $key, $type) use ($field) {
            $validator = $this->validator->make(
                [$key => $value],
                $this->getTermRules(),
                $this->getTermMessages(),
                $this->getTermPlaceholders()
            );

            $validation = $validator->valid();

            return $validation[$key] ?? null;
        };
    }
protected function sanitize ( FieldTypeInterface $ field ) { return function ( $ value , $ key , $ type ) use ( $ field ) { $ validator = $ this -> validator -> make ( [ $ key => $ value ] , $ this -> getTermRules ( ) , $ this -> getTermMessages ( ) , $ this -> getTermPlaceholders ( ) ) ; $ validation = $ validator -> valid ( ) ; return $ validation [ $ key ] ?? null ; } ; }
Sanitize term meta value.

@param FieldTypeInterface $field

@return \Closure
Sanitize term meta value .