core-bundle/src/Resources/contao/widgets/ImageSize.php
protected function isValidOption($varInput)
	{
		if ($varInput == '')
		{
			return true;
		}

		foreach ($this->arrAvailableOptions as $strGroup=>$arrValues)
		{
			if ($strGroup == 'image_sizes')
			{
				if (isset($arrValues[$varInput]))
				{
					return true;
				}
			}
			elseif (\in_array($varInput, $arrValues))
			{
				return true;
			}
		}

		return false;
	}
protected function isValidOption($varInput)
	{
		if ($varInput == '')
		{
			return true;
		}

		foreach ($this->arrAvailableOptions as $strGroup=>$arrValues)
		{
			if ($strGroup == 'image_sizes')
			{
				if (isset($arrValues[$varInput]))
				{
					return true;
				}
			}
			elseif (\in_array($varInput, $arrValues))
			{
				return true;
			}
		}

		return false;
	}
Check whether an input is one of the given options

@param mixed $varInput The input string or array

@return boolean True if the selected option exists