Questions tagged [validation]

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

Filter by
Sorted by
Tagged with
4
votes
0answers
49 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
33 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
23 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
146 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
58 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
11 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
8 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
95 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
40 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
92 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
55 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
94 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
37 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
8 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
25 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
31 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
39 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
111 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
79 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
32 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
9 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
31 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
173 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
2answers
409 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
84 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....
1
vote
1answer
35 views

How to set require field to company in billing address in magento2?

How to set require the field to a company in billing address in magento2?
2
votes
0answers
150 views

Terms and Conditions checkbox validation on checkout

On Magento 2.2.3 and I have an issue regarding the terms and conditions validation on checkout. If you have two different payment method, you select one you click place order you will have the error ...
0
votes
1answer
18 views

how to make VAT Number optional in magento 2 checkout for new customers

I enabled the VAT Number in Magento 2 admin I want to make the field is optional how i can do this??
0
votes
1answer
592 views

Magento 2 - Do not scroll to invalid field on form validation

On the log in page, when I don't input input in fields, the error message displays focusing on the invalid input. The window scrolls upto the invalid field at the same time. I do not want the window ...
1
vote
0answers
24 views

Magento form validation doesn't work as user type in

I have added form validation for the customer address form. but the issue is, validation works when I click submit button, it should work as user types in(key-up). city text box <input type="...
1
vote
2answers
133 views

MagenImage Upload File Extention JS Validation?

I'm new to Magento 2.3, i want to validate file upload field. Allowed file formats: jpeg. I put a method in lib\web\mage\validation.js require([ 'jquery', 'jquery/ui', '...
0
votes
3answers
117 views

How can i add date and month text box with validation(No calender)

How can I add Magento custom validation for month and date text box? These two are input text box user can enter the number and I have to validate it via custom validation. Don't want a calender. <...
0
votes
0answers
35 views

data-validate not working in magento 2

I have added Magento 2 form validation in customer address edit form Magento_Customer/templates/address/edit.phtml, but its not working for me. I have referred this link Magento 2 - Form ...
0
votes
0answers
84 views

Magento 2 disable address validation for paypal

I have problem. getting this error: PayPal gateway has rejected request. A match of the Shipping Address City, State, and Postal Code failed (#10736: Shipping Address Invalid City State Postal ...
2
votes
1answer
79 views

M2 | Field Validation is not working with dynamic rows in system configuration

I have applied filed validation in system.xml file it is working for other fields but not applying on Dynamic fields. Here is my Dynamic Field: <field id="add_item" translate="label" ...
2
votes
2answers
230 views

How to add custom field in registration form and add jquery validation in Magento2.2.5?

How to add custom field in registration form and save in database and add jquery validation in Magento2.2.5? Any help would be appreciated
0
votes
0answers
57 views

How to use the required validation in customer add form for a custom filed?

I have created a custom field in customer add form. I want that filed as required field in the customer add form but not in customer edit form. Please suggest how can I implement this. Thanks in ...
0
votes
0answers
20 views

how to add custom validation rule for form in magento 2

i have two fields in form file.phtml <div class="field"> <label class="label"><?php /* @escapeNotVerified */echo __('Current quote amount') ?>:</label> ...
0
votes
1answer
46 views

how to validate custom fields using variables in magento 2

here have two fields 1)Fields_1 2)Fileds_2 here i want to validate Field_2 < Filed_1 (less than ) how i do this in magenot 2??? Field_2 Tag <div class="field"> ...
0
votes
2answers
140 views

Magento 2: Allow Arabic string in “letters-only” validation

I'am working on the Magento store that have Arabic language store and English language store. I have added the "letters-only" validation on firstName input field on registration page and when I check ...
0
votes
0answers
15 views

How to put hexcode validation in custom form made using ui component?

Vendor/Module/view/adminhtml/ui_component/company_company_form.xml <field name="theme_color"> <argument name="data" xsi:type="array"> <item name="...
2
votes
3answers
211 views

Magento 2: add Validation on first name and last name so it only accept text value, not numeric

I want to add validation on first name and last name on registration page, So it only accept text value, not the numeric value. Please help me how to achieve this in Magento 2 standard recommended ...
0
votes
1answer
94 views

Magento 1.9.2. - Validate email if already exist with ajax without custom module

Before registering I would like to validate the email field entered by the user to know if it exists in the database. This is my code: <input type="text" name="emailreg" value="" id="emailPreReg" ...
0
votes
1answer
63 views

magento 2.2 add validation to checkout region input field

following this post (Magento 2.2 Input field validation on Checkout page) I can successfully add validation on the company field. But when I apply that to the region field, it doesn't work anymore. ...
0
votes
0answers
21 views

Change Validation type of text to popup in Magento 1.9

I want to change the validation message of all screens to popup instead of the label. Have shared the below screenshot of current scenario Please help me with same. The version of Magento is 1.9.3.4 ...
1
vote
0answers
31 views

Magento 2.3 validate form instant

I want to validate the form on our Magento 2.3 store instant. So when a value is added into the input field, it should validate this instant and add also a css class to the input field. In that case ...
2
votes
0answers
62 views

Magento 2.2 - How to remove product Meta Keywords maxlength validation from backend?

I want to remove validation for product meta_keyword from backend or else to increase the length of the product meta_keyword. I also tried to remove maxlength validation from vendor/magento/module-ui/...
0
votes
0answers
50 views

Inline validation error in login form Magento 2

Right now, I am getting a global error message for wrong email/password`. I want it to be an inline error message instead of a global message. Like this. Right LoginPost.php sets error message , i ...