{"record":{"id":"cb750255a1f15fe7","repo":"Meituan-Dianping/mpvue","slug":"invalid-prop-type-check-failed-for-prop-name","errorCode":null,"errorMessage":"Invalid prop: type check failed for prop \"${name}\". Expected ${expectedTypes.map(capitalize).join(', ')}, got ${Object.prototype.toString.call(value).slice(8, -1)}.","messagePattern":"Invalid prop: type check failed for prop \"(.+?)\"\\. Expected (.+?), got (.+?)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/util/props.js","lineNumber":120,"sourceCode":"  }\n  if (value == null && !prop.required) {\n    return\n  }\n  let type = prop.type\n  let valid = !type || type === true\n  const expectedTypes = []\n  if (type) {\n    if (!Array.isArray(type)) {\n      type = [type]\n    }\n    for (let i = 0; i < type.length && !valid; i++) {\n      const assertedType = assertType(value, type[i])\n      expectedTypes.push(assertedType.expectedType || '')\n      valid = assertedType.valid\n    }\n  }\n  if (!valid) {\n    warn(\n      'Invalid prop: type check failed for prop \"' + name + '\".' +\n      ' Expected ' + expectedTypes.map(capitalize).join(', ') +\n      ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\n      vm\n    )\n    return\n  }\n  const validator = prop.validator\n  if (validator) {\n    if (!validator(value)) {\n      warn(\n        'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n        vm\n      )\n    }\n  }\n}\n","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/Meituan-Dianping/mpvue/blob/6c5d78ee04f58c6d782c456dfcf0fe63c0b7f89b/src/core/util/props.js#L102-L138","documentation":"Error \"Invalid prop: type check failed for prop \"${name}\". Expected ${expectedTypes.map(capitalize).join(', ')}, got ${Object.prototype.toString.call(value).slice(8, -1)}.\" thrown in Meituan-Dianping/mpvue.","triggerScenarios":"Thrown at src/core/util/props.js:120 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a value matching the declared type: :count=\"42\" (number) not count=\"42\" (string) — remember bare attributes are always strings","Fix the prop's type declaration to match what parents actually send, or widen it to an array of allowed types: type: [String, Number]","Handle null/undefined boundaries: a null value skips the check only when the prop is not required, so guard optional inputs","Where string/number coercion is fine, normalize inside a computed or validator"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c5d78ee04f58c6d782c456dfcf0fe63c0b7f89b","analyzedAt":"2026-09-02T05:17:40.946Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T11:17:12.671Z"}