question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Property '$valid' is missing with Typescript

See original GitHub issue

I’m trying to implement i18n with Vuelidate as the example in https://vuelidate-next.netlify.app/advanced_usage.html#i18n-support in a Typescript project

But I got the following error with the minLength validator as well as minValue or sameAs (with the required validator it’s working fine):

export const minLength = withI18nMessage(validators.minLength, { withArguments: true })
Property '$valid' is missing in type 'ValidationRuleWithParams<{ length: number; }, any>' but required in type 'ValidatorResponse'.

Packages version: @vuelidate/core: “^2.0.0-alpha.32”, @vuelidate/validators: “^2.0.0-alpha.25”, vue-i18n: “^9.2.0-beta.17”,

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
dobromir-hristovcommented, Dec 5, 2021

You need to fork the project. Then GitHub will auto suggest to you too create a PR once you push your changes to a new branch on your fork.

1reaction
dobromir-hristovcommented, Nov 14, 2021

This is a bug with the createI18nMessage type, but I am not sure whats wrong there. Its probably in the validator type.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Property is missing in type 'X' but required in type 'Y' | bobbyhadz
The TypeScript error "Property is missing in type but required in type" occurs when we do not set all of the properties an...
Read more >
Typescript not addressing missing properties - Stack Overflow
Which results in this error: Type '{}' is missing the following properties from type 'Thing': id, name.
Read more >
Documentation - Classes - TypeScript
A field declaration creates a public writeable property on a class: ... Property 'ping' is missing in type 'Ball' but required in type...
Read more >
typescript-cheatsheet - GitHub Pages
In TypeScript, all newly declared object properties (including both function ... all the assigned types to the array values won't be lost when...
Read more >
Solved - Type x is missing the following properties from type y ...
Solved - Type x is missing the following properties from type y using TypeScript in React ... This error occurs when you are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found