Jump to content
mstdmstd

How to create a jsfiddle with v-money lib?

Recommended Posts

Hello,

I need to make jsfiddle with vuejs, vee-validate and v-money libs, and when I need to add some js lib to jsfiddle I open https://cdnjs.com/ and search lirary I need and found lib I attach in jsfiddle. But on https://cdnjs.com/ entering “v-money” it did not show any results. If there is a way to create a jsfiddle(or maybe some other similar service) with v-money lib?

Thanks!

Share this post


Link to post
Share on other sites

Their own documentation lists a couple jsfiddles. Have you looked at them?

Share this post


Link to post
Share on other sites

Trying my best to not sound flippant,

Have you tried Google?

  • Haha 1

Share this post


Link to post
Share on other sites

Thanks for your hint !
I got a ref to v-money from v-money github page and made this
http://jsfiddle.net/oxqv7bwt/1/
fiddle.
But validating data I always see success validation, event with negative default value :
I added console in positive_price rule definition, but I do not see this output...
Please, take a look why positive_price is not triggered. The sense of this fiddle is
just to run positive_price custom rule.
 

Share this post


Link to post
Share on other sites

1. As far as I can tell, the "rules" is supposed to be a string - not an object. If you didn't need to account for is_page_loaded then you should say

<validation-provider ... rules="required|positive_price">

2. The validation function needs to return true or false. You are returning string or false.

  • Great Answer 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.