/** * @param mixed $di - Device Identifier component * * @return bool */ public static function validate($di) { $di = self::unDecorate($di); $validUdiLength = [8, 12, 13, 14]; $length = strlen($di); if (!in_array($length, $validUdiLength)) { return false; } return parent::check($di, $length); }
/** * @param mixed $dun14 * * @deprecated in favor of Gtin14 * * @return bool */ public static function validate($dun14) { return parent::check($dun14, 14); }