Home / Function/ validateComponentName() — vue Function Reference

validateComponentName() — vue Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  0c83fb91_c505_2615_043d_57ea0224f702["validateComponentName()"]
  f9a04a4a_086c_f4c9_b94b_e0ee7fbc01f3["checkComponents()"]
  f9a04a4a_086c_f4c9_b94b_e0ee7fbc01f3 -->|calls| 0c83fb91_c505_2615_043d_57ea0224f702
  a8c8f192_fd2d_dbe3_46ed_dd8fabebc429["warn()"]
  0c83fb91_c505_2615_043d_57ea0224f702 -->|calls| a8c8f192_fd2d_dbe3_46ed_dd8fabebc429
  style 0c83fb91_c505_2615_043d_57ea0224f702 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.
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