#bhavi-evrig
1 messages · Page 1 of 1 (latest)
hello! can you share your code and explain what have you tried, and what you mean by it's not working?
``
<div class="form-group row">
<div id="address-element" class="col-sm-12">
<!-- Elements will create form elements here -->
</div>
</div>
<div class="form-group row">
<div id="card-element" class="col-sm-12">
<!-- Stripe.js will create card input elements here -->
</div>
</div>
async function handleSubscriptionSubmit(e) {
e.preventDefault();
$("#subscrFrm").validate({
// Specify validation rules
rules: {
// The key name on the left side is the name attribute
// of an input field. Validation rules are defined
// on the right side
name: "required",
},
// Specify validation error messages
messages: {
name: "Please enter your firstname and lastname",
},
// Make sure the form is submitted to the destination defined
// in the "action" attribute of the form when valid
submitHandler: function(form) {
form.submit();
setLoading(true);
$('#submitBtn').attr("disabled", "disabled");
});
}
even if the name is blabnk its going to submitHandler part
i'd suggest you try using the onChange event - https://stripe.com/docs/js/element/events/on_change?type=addressElement and check if complete=true
Is there any way I can check on Submit?
This how elements are mounted
I am trying to get the element by name or id oreven using query selector but its always undefined
gimme a while to test something