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

[bug] The placeholder {min} isn't replaced when min_value:0 #2332

Closed
Matiyeu opened this issue Sep 13, 2019 · 1 comment
Closed

[bug] The placeholder {min} isn't replaced when min_value:0 #2332

Matiyeu opened this issue Sep 13, 2019 · 1 comment
Labels
🐛 bug Unintended behavior

Comments

@Matiyeu
Copy link
Contributor

Matiyeu commented Sep 13, 2019

Versions

  • vee-validate: 3.0.5
  • vue: 2.6.10

Describe the bug

The placeholder {min} is not replaced when we set 0 at the min_value rule.

To reproduce

<ValidationProvider rules="required|min_value:0" v-slot="{ errors }" name="price">
    <input type="number" v-model="price">
    <div v-if="errors">{{ errors[0] }}</div>
</ValidationProvider>

result:

The price field must be {min} or more

Expected behavior

The price field must be 0 or more

Desktop (please complete the following information):

  • OS: All
  • Browser : All

Smartphone (please complete the following information):

  • Device: All
  • OS: All
  • Browser All
@logaretm logaretm added the 🐛 bug Unintended behavior label Sep 16, 2019
@logaretm
Copy link
Owner

Thanks for reporting this, this was a bug in interpolation where the value 0 would be falsy and would cause the interpolation function to ignore it.

Fixed it by checking for its existence rather than its truthiness. Should be up in the next release.

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