diff --git a/assets/js/frontend/user-registration-form-validator.js b/assets/js/frontend/user-registration-form-validator.js
index 1c3482570..a02b4f040 100644
--- a/assets/js/frontend/user-registration-form-validator.js
+++ b/assets/js/frontend/user-registration-form-validator.js
@@ -2,7 +2,7 @@
(function ($) {
var user_registration_form_selector;
- user_registration_form_selector = $(".ur-frontend-form form");
+ user_registration_form_selector = $(".ur-frontend-form form, form.cart");
var field_selector = "";
@@ -142,6 +142,11 @@
if (typeof $.fn.validate === "undefined") {
return false;
}
+ //Validation by pass for wc quantity field.
+ var qty_max = $(document).find('[name="quantity"]');
+ if(qty_max.attr('max') === ""){
+ qty_max.removeAttr('max');
+ }
var $this_node = this;
$this_node.$user_registration.each(function () {
diff --git a/includes/functions-ur-template.php b/includes/functions-ur-template.php
index 18b63235c..4efab50d6 100644
--- a/includes/functions-ur-template.php
+++ b/includes/functions-ur-template.php
@@ -182,8 +182,9 @@ function user_registration_form_field( $key, $args, $value = null ) {
$args = apply_filters( 'user_registration_form_field_args', $args, $key, $value );
if ( true === ur_string_to_bool( $args['required'] ) ) {
- $args['class'][] = 'validate-required';
- $required = ' *';
+ $args['class'][] = 'validate-required';
+ $args['custom_attributes']['required'] = 'required';
+ $required = ' *';
} else {
$args['required'] = '';
}