public function containsOption($optionValue, $options)
    {
        if ($this->validationDisabled) {
            return true;
        }

        foreach ($options as $option) {
            if ($option['value'] == $optionValue) {
                return true;
            }
        }

        return false;
    }
public function containsOption($optionValue, $options)
    {
        if ($this->validationDisabled) {
            return true;
        }

        foreach ($options as $option) {
            if ($option['value'] == $optionValue) {
                return true;
            }
        }

        return false;
    }
public function containsOption ( $ optionValue , $ options ) { if ( $ this -> validationDisabled ) { return true ; } foreach ( $ options as $ option ) { if ( $ option [ 'value' ] == $ optionValue ) { return true ; } } return false ; }
Checks whether given value is in the existing options.

@param string $optionValue
@param array  $options

@return bool
Checks whether given value is in the existing options .