protected function validate(\Smile\ElasticsuiteThesaurus\Api\Data\ThesaurusInterface $thesaurus)
    {
        $exception = new \Magento\Framework\Exception\InputException();

        $validator = new \Zend_Validate();
        if (!$validator->is(trim($thesaurus->getName()), 'NotEmpty')) {
            $exception->addError(__(InputException::REQUIRED_FIELD, ['fieldName' => 'name']));
        }

        if ($exception->wasErrorAdded()) {
            throw $exception;
        }
    }
protected function validate(\Smile\ElasticsuiteThesaurus\Api\Data\ThesaurusInterface $thesaurus)
    {
        $exception = new \Magento\Framework\Exception\InputException();

        $validator = new \Zend_Validate();
        if (!$validator->is(trim($thesaurus->getName()), 'NotEmpty')) {
            $exception->addError(__(InputException::REQUIRED_FIELD, ['fieldName' => 'name']));
        }

        if ($exception->wasErrorAdded()) {
            throw $exception;
        }
    }
protected function validate ( \ Smile \ ElasticsuiteThesaurus \ Api \ Data \ ThesaurusInterface $ thesaurus ) { $ exception = new \ Magento \ Framework \ Exception \ InputException ( ) ; $ validator = new \ Zend_Validate ( ) ; if ( ! $ validator -> is ( trim ( $ thesaurus -> getName ( ) ) , 'NotEmpty' ) ) { $ exception -> addError ( __ ( InputException :: REQUIRED_FIELD , [ 'fieldName' => 'name' ] ) ) ; } if ( $ exception -> wasErrorAdded ( ) ) { throw $ exception ; } }
Validate thesaurus values

@param \Smile\ElasticsuiteThesaurus\Api\Data\ThesaurusInterface $thesaurus the thesaurus to validate

@return void
@throws \Magento\Framework\Exception\InputException
Validate thesaurus values