Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong typings for ErrorField #852

Closed
firewave-remo opened this issue Sep 27, 2017 · 1 comment
Closed

Wrong typings for ErrorField #852

firewave-remo opened this issue Sep 27, 2017 · 1 comment
Labels
🐛 bug Unintended behavior

Comments

@firewave-remo
Copy link

Versions:

  • VueJs: 2.4.4
  • Vee-Validate: 2.0.0-rc.17

Description:

The typing for ErrorField is like this:

export class ErrorField {
    field: string;
    scope?: string;
    rule: string;
    msg: string;
    id: string;
}

But in the documentation is the following written:

const error = {
  field: 'Field name',
  msg: 'Error message',
  rule: 'Rule Name', // optional
  scope: 'Scope Name', // optional
  id: 'uniqueId' // optional
};

Which one is right? I think the latter, but because i am working with typescript, the wrong typings are an issue for me when i call this.$validator.errors.add(error)

Thx

@logaretm
Copy link
Owner

You can submit a PR to fix them if you can, the documentation has the correct ones, Typings are maintained by the community so sometimes they get out of sync with the current implementation.

@logaretm logaretm added the 🐛 bug Unintended behavior label Sep 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants