JQuery form validator and bootstrap html

Hi,

I am trying to create a Stripe.js-powered form and I want to validate the form on submission too.
Here is my code: http://pastebin.com/PQpr4XYN

  1. I am not good in JQuery, form validator works fine but after filling in the form with valid data I get “Validation Passed” message instead of the form actually being submitted, what changes should I do in that JQuery code?

  2. I am not familiar with bootstrap, so size=30 to show fields smaller, doesn’t work. which changes should I do?

You need to remember that a Stripe form is submitted via Ajax first so as to pass the credit card number and get back a token to submit with the form instead. - the fields that are in the form when it is actually submitted are not the same fields that are in the form at the start.

I discovered my mistake, the problem is missing stripe-data tags in form fields. It seems stripe requires two data-stripe=“exp-month” and data-stripe=“exp-year” but in that form it is asking in one field, separated with / for validation, so I need to add a part in my stripe script to split data passed by by / and assign the values to data-stripe=“exp-month” and data-stripe=“exp-year”. Please advice how can I do this in that script?
Please look at this source instead of previous one: http://pastebin.com/DZhNNGe7 please advice.

to continue previous post:

for validator I use this 3rd party script: https://github.com/stripe/jquery.payment/tree/master/lib
I see it has already a feature to split mm and yy here https://github.com/stripe/jquery.payment#paymentcardexpiryvalstring-and-fnpaymentcardexpiryval , but I have no idea how to use that function to split fom expiry date and assign them to data-stripe="exp-month" and data-stripe="exp-year"
Please advice how can I do this?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.