MCPcopy
hub / github.com/vaxilu/x-ui / validateComponentName

Function validateComponentName

web/assets/vue@2.6.12/vue.runtime.esm.js:1399–1412  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

1397}
1398
1399function validateComponentName (name) {
1400 if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
1401 warn(
1402 'Invalid component name: "' + name + '". Component names ' +
1403 'should conform to valid custom element name in html5 specification.'
1404 );
1405 }
1406 if (isBuiltInTag(name) || config.isReservedTag(name)) {
1407 warn(
1408 'Do not use built-in or reserved HTML elements as component ' +
1409 'id: ' + name
1410 );
1411 }
1412}
1413
1414/**
1415 * Ensure all props option syntax are normalized into the

Callers 3

checkComponentsFunction · 0.70
initExtendFunction · 0.70
initAssetRegistersFunction · 0.70

Calls 1

warnFunction · 0.70

Tested by

no test coverage detected