Questions tagged [validation]

Denotes questions related to validation like form validation, jQuery validation, prototype validation, server-side validation.

Filter by
Sorted by
Tagged with
0
votes
0answers
21 views

How to observe event before saveShipping or saveBilling actions for address validation

Update: For my understanding (please correct me If I am wrong) the problem here is that the controller_action_predispatch_checkout_onepage_saveBilling gets dispatched and the following code is being ...
0
votes
0answers
10 views

Scroll top to PhoneNumber field in one-page checkout when place order button is clicked in magento 2?

I am validating OTP for the phone number field in Magento 2 one-page checkout. (ref link). If the phone number is not verified I need to scroll top to the that field when the place order button is ...
0
votes
0answers
19 views

How to get the shipping phone number before the order get placed in magento 2?

I am validating the phone number by OTP. So when a customer clicks on the place order button I need to check the phone number get verified or not before placing the order. For this, I need to get the ...
0
votes
1answer
43 views

How to show validation or disable checkout until the phone number get verified with otp in magento 2?

I am verifying the phone number through OTP in Magento 2 one page checkout. when the user clicks the place order button before the phone number gets verified, I need to show a validation message to ...
0
votes
2answers
39 views

how to add magento2 checkout shipping form add validate-digits-range

I am trying to override checkout_index_index.xml using below code for minimum digits : <item name="telephone" xsi:type="array"> <item name="validation" xsi:type="array"> <...
0
votes
0answers
14 views

Magento 2 - City drop-down validation issue

change City input field to drop-down in customer address form. but i can't resole city filed validation issue. How to change City field to a dropdown in Checkout step Magento 2
0
votes
0answers
28 views

Magento 2 : Prevent Redirect to Cart Page when Place Order Error

As I know on Magento 2 when there is problem after click "Place Order" button on the checkout page, it will redirect to cart page. How I change this and create global validation to show the error on ...
1
vote
0answers
20 views

In magento 2, how to to make server call from knockout js to validate phone number in checkout page which already exist in my list?

How can i validate the telephone number already exist in my my database table(or suggest me, how to to make server call from knockout js to validate phone number which already exist in my list).My ...
0
votes
1answer
35 views

Need to override following file rules.js

magento2.3.3/pub/static/adminhtml/Magento/backend/da_DK/Magento_Ui/js/lib/validation/rules.js I need to override rules.js for specific Danish locale only for Admin area, how can I achieve that. In ...
1
vote
2answers
92 views

Magento 2 : Validate a condition rules based on product attribute

How to validate a condition rules based on product attribute in magento 2 backend: code: $product_id = '3'; // Crown Summit Backpack sku is 24-MB03 $objectManager = \Magento\Framework\...
0
votes
0answers
15 views

Magento 2 Address Validation In checkout

How to validate the shipping address by using external services and provide address suggestions for customer to select the suggested address in checkout?
6
votes
2answers
38 views

Is anyone have an idea, how to convert XML to LayoutProcessor format?

Is anyone have an idea about convert XML to LayoutProcessor format? I have created a layout processor as given below. I need to only those sentence which is defined in XML. \Magento\Checkout\Block\...
1
vote
1answer
55 views

Error message for email and confirm email validation

I have 2 fields in form . 1.user email 2.confirm email. If I fill on user email field and moved to confirm email field then enter wrong email i.e; not same as user email, it is showing error "both ...
1
vote
0answers
16 views

Checkout validation function missing in 2.3.3

Magento\Quote\Model\Quote\Address validate() function is missing in Magento 2.3.3 I'm trying to remove billing address validation from checkout. I've removed it from frontend, but still getting ...
1
vote
0answers
21 views

Magento2: how to add ten digit mobile number validation on contact us page?

I want to add ten digit mobile number validation on contact us page. I already followed this but not working for me.
0
votes
2answers
20 views

Make taxvat not required on customer registration form programmatically

I want to force taxvat field as not required on customer create form Even if i have ovrride vendor/magento/module-customer/view/frontend/templates/widget/taxvat.phtml with a plugin in my custom ...
1
vote
1answer
15 views

Magento1.9 : Translate validation messages for different stores

In my having two stores France and German.I want to validation error messages with their particular languages.How can I do it with my Js script? My code <label for="sample" class="required"...
1
vote
0answers
38 views

Validate 2 fields combined in Magento checkout - Add new shipping address

On Magento checkout page > Add new Shipping Address. I want to validate maximum 30 characters for both Street 1 and Street 2 combined.
1
vote
1answer
37 views

Validation date is not working in Magento2

$dateFormat = $this->_localeDate->getDateFormat(\IntlDateFormatter::SHORT); $fieldset->addField( 'to_date', 'date', [ 'name' => 'to_date', 'label' => __('...
0
votes
0answers
25 views

OR condition validation in Magento

Having two select fields in template file <select id="ab" class="required-entry" name="abc" title="abc" > <option value="">-----</option> <option value="1">...
0
votes
0answers
24 views

How to validate unique phone number field(like email) in magento 2 registration form?

I am using email or phone number login option Magento 2.I added phone number field below the email and I need to validate phone number to be unique like email in Magento 2.How can I programmatically ...
0
votes
1answer
37 views

Magento 2 - Extend custom validation / add own validation rule

In Magento 1, I used the below javascript code inside of a template to add my own validation rule: // Add new validation class for the name. Also supports names with two hypen in the name e.g. Hans-...
0
votes
2answers
103 views

Image Uploader in Dynamic Rows Ui Component not saved since Magento 2.3.3

I made a module using dynamic rows component with imageUploader field inside. I was able to upload my image on the Magento 2.3.2, but since the new release (2.3.3), I can't pass the valideFileId() ...
4
votes
0answers
79 views

How to add custom validation for Street 1 in Checkout page > Add shipping address in Magento 2.2.8?

How to add custom validation for Street 1 in Checkout page > Add shipping address in Magento 2.2.8 ? I want to apply custom validation on Street 1 field and I have tried below things. Method 1 I ...
2
votes
0answers
41 views

How to override lib/web/mage/validation.js in Magento 2.2.8?

In order to override lib/web/mage/validation.js in Magento 2.2.8 ? I have tried this way but not working. app/design/frontend/STORE/THEME/web/mage/validation.js Edited : it was due to custom theme!...
1
vote
1answer
40 views

Magento 2 - Customer name validation

On the checkout shipping section the first and last name input fields have validation on them which doesn't accept hyphens (-) or ' characters I had a look in lib/mage/validation.js but can't see ...
2
votes
4answers
161 views

Toggle “required/not required” field in checkout

I have added a custom field in checkout called "Area". Area field is required by default, but I'd like to change that based on the selected country. If customer selects a country other than FR, then ...
0
votes
3answers
79 views

Magento 2: Extension Validation error for marketplace

marketplace, I am validating my extension but i have two extentions in one directory Here is Zip directory structure is: Module Zip folder ABC.zip module1 module2 getting error: More ...
0
votes
0answers
40 views

Magento2 backend - can't save product SQL query stuck or validation error

We have run into a problem recently on our Magento 2.3.1 store. When trying to save a product on the backend, the loading screen runs forever (or until the SQL sever gives up). It comes with a "false"...
0
votes
0answers
13 views

Magento 2: Validation message in XML

I want to edit the validation message on some input fields. I see that input fields are defined in the xml file (checkout_index_index.xml). Is there a way to override validation message in this xml? &...
0
votes
1answer
328 views

Change date of birth date format in Magento 2.3

I want to change the validation for DOB field on create account page. Currently the validation is in the format mm/dd/yyyy , I want to change the validation for that field to dd/mm/yyyy. Can anybody ...
0
votes
0answers
138 views

Magento 2 : VAT number validation by VIES

I want to implement VAT number implementation on my custom page by VIES. How to implement it? Any help would be appreciated.
3
votes
1answer
118 views

Magento 2.3.2 password always Weak

We have upgraded our Magento installation to 2.3.2 from 2.1.16 and the password validation when creating a customer account in the frontend doesn't work. When I enter the following password " ...
1
vote
2answers
159 views

Programmatically check VAT number is valid in checkout page magento 2.3.X?

I want to Programmatically check VAT number is valid in checkout page magento 2.3.X whether using of event or plugin. Please provide any suggestion to achieve it.
0
votes
1answer
255 views

Magento 2 : Add validation for tax/Vat number

Can any one tell me how can i add validation for Tax/Vat number field. I want to make it numeric. https://prnt.sc/ouycdv What i have done till now in taxvat.phtml is <input type="number" id="<...
2
votes
1answer
43 views

Billing form is not updating in magento 2

I am trying to updating the checkout forms telephone field validation. I have achieved this for shipping form but in billing form it is not working. For this I have done in my di.xml: <type name=...
0
votes
0answers
12 views

Validation Zip/Code for only “Deutschland” in Magento 1.x

I have a select box like this <div class="input-box"> <select name="billing[country_id]" id="billing-country_id" class="validate-select" title="Land"> <option value=""> &...
0
votes
1answer
38 views

Magento 2 : How to validate confirm password

Password confirmation not working, code is given below <div id="password-div" style="display:none"> <div class="field password required"> ...
0
votes
0answers
43 views

Magento 2 : Change position of validation error message on product listing page

I need to change the position of validation error message on product listing page. Right now, it's display after Add to cart button. But, I want to display error message position same as like display ...
0
votes
1answer
40 views

Magento2: How can I create a validation for telephone inputs inside Magento Admin?

I have to create a validation for the telephone inputs in Magento Admin. I need to set a min of characters like 8 and a max of 15. I'm currently using 2.2.8 version. I tried to set the validation by ...
1
vote
0answers
250 views

Magento 2: Ajax validation in checkout page

So I need to add an AJAX validation for the field VAT number of shipping and billing address in checkout page, which is basically like this: define([], function () { return { validate:...
0
votes
1answer
254 views

Magento 2 : How to validate email or mobile number in a textbox validation

<input type="text" class="input-email-mobile " id="customer-email-mobile"> I need to validate Mobile number or email in the above text box using magento validation.! maybe the user enter ...
0
votes
0answers
119 views

Magento 2 - Custom additional checkout field validation not working when customer is logged in

I've added a custom checkout field with validation in additional shipping area using a layout processor plugin. Vendor\Module\Model\Checkout\LayoutProcessorPlugin.php public function afterProcess (...
1
vote
0answers
21 views

How to get validator error or cannot add product to cart [closed]

I'm using Magento 1.9 (CE) and I cant add the product to cart due to validator error. There's no message, it just returns false. If I'll try to submit the form with product manually it'll add to cart. ...
0
votes
0answers
10 views

Validation for new attribute on customer signup controller

I have created new attribute 'customer_interest' and successfully getting it in form, frontend validation is working. Now I need to validate it on backend(php), which file I need to work on? where is ...
0
votes
1answer
40 views

How to validate google recaptcha in Magento 2.3.1

I am using Magento version 2.3.1 I have enabled the google recaptcha module via backend & given the associated credentials. Now captcha working fine in the registration page. But I wish to add a ...
0
votes
2answers
382 views

How to bypass CSRF validation for certain requests

I am trying to bypass the CSRF validation for my Controller. I had seen a few workaround in the below links. Magento 2.3 upgrade breaks HTTP POST requests to custom module endpoint But I need my ...
8
votes
3answers
794 views

Add Custom Validation Street Address Field in backend Magento 2

I Want To Set Minimum Length Value For Street Address Field On Admin Side I want to set min_text_length = 5 For Street Address Field In Customer Address Form I am Trying To Update Attribute but ...
3
votes
0answers
99 views

How to translate “ This is a required ” in Magento 2

I want translate error message required field like this I used de_DE.csv but the get fields from data it does not translate, please help me! Thanks all
2
votes
1answer
21 views

How to validate thousands of image URLs

I have multi-vendors and each one has thousands of products and each product has at-least one image URL. we've imported their CSV file to our Magento 1.9 and looks like there are bunch of broken links....