Home / Function/ validateComponentName() — vue Function Reference

validateComponentName() — vue Function Reference

Architecture documentation for the validateComponentName() function in options.ts from the vue codebase.

Function typescript CoreRuntime Instance calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  dc445517_de1a_e120_295e_657a7ea97513["validateComponentName()"]
  5c734a8f_efba_819c_28fc_f56bfd6b701f["options.ts"]
  dc445517_de1a_e120_295e_657a7ea97513 -->|defined in| 5c734a8f_efba_819c_28fc_f56bfd6b701f
  e326ac77_8ca1_bb32_d3f1_07fd7421ceda["checkComponents()"]
  e326ac77_8ca1_bb32_d3f1_07fd7421ceda -->|calls| dc445517_de1a_e120_295e_657a7ea97513
  e8b22500_20a5_2e19_4c79_386004841499["warn()"]
  dc445517_de1a_e120_295e_657a7ea97513 -->|calls| e8b22500_20a5_2e19_4c79_386004841499
  style dc445517_de1a_e120_295e_657a7ea97513 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/core/util/options.ts lines 299–317

export function validateComponentName(name: string) {
  if (
    !new RegExp(`^[a-zA-Z][\\-\\.0-9_${unicodeRegExp.source}]*$`).test(name)
  ) {
    warn(
      'Invalid component name: "' +
        name +
        '". Component names ' +
        'should conform to valid custom element name in html5 specification.'
    )
  }
  if (isBuiltInTag(name) || config.isReservedTag(name)) {
    warn(
      'Do not use built-in or reserved HTML elements as component ' +
        'id: ' +
        name
    )
  }
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does validateComponentName() do?
validateComponentName() is a function in the vue codebase, defined in src/core/util/options.ts.
Where is validateComponentName() defined?
validateComponentName() is defined in src/core/util/options.ts at line 299.
What does validateComponentName() call?
validateComponentName() calls 1 function(s): warn.
What calls validateComponentName()?
validateComponentName() is called by 1 function(s): checkComponents.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free