-
Notifications
You must be signed in to change notification settings - Fork 27
Prop Validation Returns Error if Empty String #15
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
Comments
Hey @DinsmoreDesign, I've added some tests in the
but couldn't see that message you described, which is odd since I explicitly pass the empty string to the component and I should see that too. Would you have a reproducible test case? |
@AlexandreBonneau Hmm... oddly enough, I can't seem to get this to replicate on the Codepen example. I'm using the module system in my app. I can't seem to get your project to run properly, but copying and pasting your example into my own project, it still reproduces the console error for me: https://github.com/DinsmoreDesign/Vue-AutoNumeric-Test |
Ok, I fixed the bug, and am going to push it with other fixes in the next couple hours. For info, you will be able to check that it works with your test project, but you will need to modify your webpack configuration to add the following alias: resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js',
AutoNumeric: 'autonumeric/dist/autoNumeric.min', // The new line to add
},
extensions: ['*', '.js', '.vue', '.json']
}, If you don't, the build will still work, but you'll get an error from uglifyjs. |
Hey guys,
Loving the functionality of this library so far, but my only real issue so far is that if I try to pass an empty string (""), I get the following error:
As far as I can tell, it's necessary to pass an empty string into the component for it to show the Placeholder value. The component still works as intended after I enter a number, but I'm not too fond of seeing a giant red warning on my console, when it's really not an issue that I can see. Can we add prop validation for a String as well, so an empty value can be passed, or is there a better way to do this?
Thanks!
The text was updated successfully, but these errors were encountered: