---
url: /docs/guide/usage/linter/rules/vue/require-prop-type-constructor.md
---

### What it does

Require `props` type values to be a constructor function (e.g. `String`,
`Number`, `Boolean`) rather than a string, number, or other literal.

### Why is this bad?

Vue uses the prop type for runtime validation and dev-time warnings. A
string like `'String'` looks like the constructor but is never matched
against an actual value, silently disabling the check.

### Examples

Examples of **incorrect** code for this rule:

```vue
<script>
export default {
  props: {
    foo: "String",
    bar: { type: "Number" },
  },
};
</script>
```

Examples of **correct** code for this rule:

```vue
<script>
export default {
  props: {
    foo: String,
    bar: { type: Number },
  },
};
</script>
```

## How to use

## Version

This rule was added in v1.68.0.

## References
