public function isValid($value)
    {
        $acceptedValues = GeneralUtility::trimExplode('|', $this->options['values']);

        if (false === in_array($value, $acceptedValues)) {
            $errorMessage = $this->translateErrorMessage('validator.has_values.not_valid', 'configuration_object', [implode(', ', $acceptedValues)]);
            $this->addError($errorMessage, 1456140151);
        }
    }
public function isValid($value)
    {
        $acceptedValues = GeneralUtility::trimExplode('|', $this->options['values']);

        if (false === in_array($value, $acceptedValues)) {
            $errorMessage = $this->translateErrorMessage('validator.has_values.not_valid', 'configuration_object', [implode(', ', $acceptedValues)]);
            $this->addError($errorMessage, 1456140151);
        }
    }
public function isValid ( $ value ) { $ acceptedValues = GeneralUtility :: trimExplode ( '|' , $ this -> options [ 'values' ] ) ; if ( false === in_array ( $ value , $ acceptedValues ) ) { $ errorMessage = $ this -> translateErrorMessage ( 'validator.has_values.not_valid' , 'configuration_object' , [ implode ( ', ' , $ acceptedValues ) ] ) ; $ this -> addError ( $ errorMessage , 1456140151 ) ; } }
Checks if the given values is one of the accepted values.

@param mixed $value The value that should be validated.
Checks if the given values is one of the accepted values .