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 VueCore Instance calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  73b79403_86a7_b172_0305_5929163303d0["validateComponentName()"]
  395cc6b0_6f88_f1b1_f5dd_8cdf5c229777["options.ts"]
  73b79403_86a7_b172_0305_5929163303d0 -->|defined in| 395cc6b0_6f88_f1b1_f5dd_8cdf5c229777
  90eff807_db4c_cc74_cbcc_389cda3db27c["checkComponents()"]
  90eff807_db4c_cc74_cbcc_389cda3db27c -->|calls| 73b79403_86a7_b172_0305_5929163303d0
  48bc61b1_05ca_3121_50a7_2f02cdcf2f03["warn()"]
  73b79403_86a7_b172_0305_5929163303d0 -->|calls| 48bc61b1_05ca_3121_50a7_2f02cdcf2f03
  style 73b79403_86a7_b172_0305_5929163303d0 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