Skip to content

fix(rules): type resolution for custom rules#22701

Merged
J-Sek merged 1 commit intomasterfrom
fix/rules-TS-custom-builder
Mar 25, 2026
Merged

fix(rules): type resolution for custom rules#22701
J-Sek merged 1 commit intomasterfrom
fix/rules-TS-custom-builder

Conversation

@J-Sek
Copy link
Copy Markdown
Contributor

@J-Sek J-Sek commented Mar 10, 2026

fixes #22688

<template>
  <v-app theme="dark">
    <v-container>
      <v-text-field :rules="usernameRules" />
    </v-container>
  </v-app>
</template>

<script setup>
  import { useRules } from '@/labs/rules'

  const all = useRules()
  const usernameRules = [all.required(), all.pinCode()]
  // hover over to see the types. IDE might not highlight issues in Playground.vue
</script>

@J-Sek J-Sek self-assigned this Mar 10, 2026
@J-Sek J-Sek added T: bug Functionality that does not work as intended/expected typescript labs Must be completed for this component to leave labs E: rules labels Mar 10, 2026
@J-Sek J-Sek merged commit 053b605 into master Mar 25, 2026
17 checks passed
@J-Sek J-Sek deleted the fix/rules-TS-custom-builder branch March 25, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

E: rules labs Must be completed for this component to leave labs T: bug Functionality that does not work as intended/expected typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report][4.0.1] TypeScript error when using custom validation rules

1 participant