Indica si un valor es del tipo correcto

@param mixed $value

@return bool
5120
private function isValidType($value): bool
    {
        if ($this->type instanceof DataType) {
            return $this->type->isTheTypeOf($value);
        }

        return true;
    }
833363
public function isValueValid($value) {
		return $value instanceof Type\CreativeWork || $value instanceof Type\ItemList || $value instanceof DataType\TextType;
	}
420987
protected function isValid($value)
    {
        if (!isset($this->options['locale'])) {
            $locale = $this->localizationService->getConfiguration()->getDefaultLocale();
        } elseif (is_string($this->options['locale'])) {
            $locale = new I18n\Locale($this->options['locale']);
        } elseif ($this->options['locale'] instanceof I18n\Locale) {
            $locale = $this->options['locale'];
        } else {
            $this->addError('The "locale" option can be only set to string identifier, or Locale object.', 1281286579);
            return;
        }

        $strictMode = $this->options['strictMode'];

        $formatLength = $this->options['formatLength'];
        NumbersReader::validateFormatLength($formatLength);

        $formatType = $this->options['formatType'];
        NumbersReader::validateFormatType($formatType);

        if ($formatType === NumbersReader::FORMAT_TYPE_PERCENT) {
            if ($this->numberParser->parsePercentNumber($value, $locale, $formatLength, $strictMode) === false) {
                $this->addError('A valid percent number is expected.', 1281452093);
            }
            return;
        } else {
            if ($this->numberParser->parseDecimalNumber($value, $locale, $formatLength, $strictMode) === false) {
                $this->addError('A valid decimal number is expected.', 1281452094);
            }
        }
    }
17175
public function isValueValid($value) {
		return $value instanceof Type\AudienceType || $value instanceof Type\OrganizationType || $value instanceof Type\PersonType;
	}
423878
public function isValueValid($value) {
		return $value instanceof Type\PlaceType || $value instanceof Type\PostalAddressType || $value instanceof DataType\TextType;
	}
1275350
public function isValueValid($value) {
		return $value instanceof Type\GeoShape || $value instanceof Type\Place || $value instanceof DataType\TextType;
	}
598000
public function isValueValid($value) {
		return $value instanceof Type\CreativeWork || $value instanceof Type\Product || $value instanceof DataType\URLType;
	}
1215652
public function isValueValid($value) {
		return $value instanceof Type\PropertyValueType || $value instanceof DataType\TextType || $value instanceof DataType\URLType;
	}
1296136
public function isValid($value)
    {
        $this->_setValue((string) $value);

        if (is_string($value)
            && (('' === $value) 
            || preg_match('/^\s+$/s', $value))
        ) {
            $this->_error();
            return false;
        } elseif (!is_string($value) && empty($value)) {
            $this->_error();
            return false;
        }

        return true;
    }
7394
protected function isValueSelected($value)
	{
		$val = $this->getValue();
		if (is_null($value)) {
			return FALSE;
		}
		elseif (is_array($val)) {
			return in_array($value, $val);
		}

		return $value == $val;
	}
253515
public function isValueValid($value) {
		return $value instanceof Type\AlignmentObject || $value instanceof Type\Course || $value instanceof DataType\TextType;
	}
186143
public function isValueValid($value) {
		return $value instanceof Type\AlignmentObjectType || $value instanceof Type\CourseType || $value instanceof DataType\TextType;
	}
209228
public function isValid($value)
    {
        $valueString = (string) $value;
        $this->_setValue($valueString);

        if (strlen($valueString) !== 12) {
            $this->_error(self::INVALID_LENGTH);
            return false;
        }

        $barcode = substr($valueString, 0, -1);
        $oddSum  = 0;
        $evenSum = 0;

        for ($i = 0; $i < 11; $i++) {
            if ($i % 2 === 0) {
                $oddSum += $barcode[$i] * 3;
            } elseif ($i % 2 === 1) {
                $evenSum += $barcode[$i];
            }
        }

        $calculation = ($oddSum + $evenSum) % 10;
        $checksum    = ($calculation === 0) ? 0 : 10 - $calculation;

        if ($valueString[11] != $checksum) {
            $this->_error(self::INVALID);
            return false;
        }

        return true;
    }
1319492
protected function isValueValid($value) {
		$this->checkValue($value);
		
		if ($this->validatable === null) {
			return true;
		}
		
		return $this->validatable->testEiFieldValue($this->eiu, $value);
	}
1000801
public function isValueValid($value) {
		return $value instanceof Type\Distance || $value instanceof DataType\NumberType || $value instanceof DataType\TextType;
	}
921302
public function isValid($value)
    {
        $this->_setValue($value);

        if (!is_string($value)) {
            $this->_error(self::INVALID, $value);
            return false;
        }

        if (!ctype_digit($value)) {
            $this->_error(self::CONTENT, $value);
            return false;
        }

        $length = strlen($value);
        $types  = $this->getType();
        $foundp = false;
        $foundl = false;
        foreach ($types as $type) {
            foreach ($this->_cardType[$type] as $prefix) {
                if (substr($value, 0, strlen($prefix)) == $prefix) {
                    $foundp = true;
                    if (in_array($length, $this->_cardLength[$type])) {
                        $foundl = true;
                        break 2;
                    }
                }
            }
        }

        if ($foundp == false){
            $this->_error(self::PREFIX, $value);
            return false;
        }

        if ($foundl == false) {
            $this->_error(self::LENGTH, $value);
            return false;
        }

        $sum    = 0;
        $weight = 2;

        for ($i = $length - 2; $i >= 0; $i--) {
            $digit = $weight * $value[$i];
            $sum += floor($digit / 10) + $digit % 10;
            $weight = $weight % 2 + 1;
        }

        if ((10 - $sum % 10) % 10 != $value[$length - 1]) {
            $this->_error(self::CHECKSUM, $value);
            return false;
        }

        if (!empty($this->_service)) {
            try {
                // require_once 'Zend/Validate/Callback.php';
                $callback = new Zend_Validate_Callback($this->_service);
                $callback->setOptions($this->_type);
                if (!$callback->isValid($value)) {
                    $this->_error(self::SERVICE, $value);
                    return false;
                }
            } catch (Zend_Exception $e) {
                $this->_error(self::SERVICEFAILURE, $value);
                return false;
            }
        }

        return true;
    }
505905
public function isValueValid($value) {
		return $value instanceof Type\DataFeedItemType || $value instanceof DataType\TextType || $value instanceof Type\ThingType;
	}