Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [validation]

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

2
votes
0answers
19 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
13 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
33 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
18 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
42 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
84 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
16 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
15 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 ...
1
vote
1answer
41 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
48 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
30 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
19 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
35 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
0answers
38 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
14 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="...
1
vote
3answers
56 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
27 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
33 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
17 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
26 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
35 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
16 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 ...
0
votes
0answers
58 views

Magento 2 checkout postcode validation only numbers

Magento 2 in checkout page postcode, I want to restrict alphabets allowed only numbers, how can I set by using a validation XML file? I tried below link for postcode validation number <item ...
2
votes
0answers
61 views

Authorize.net not accepting any testing Credit card on Magento 2.2.5 in sandbox mode

I have managed to successfully configure authorize.net with latest SHA on Magento 2.2.5 and its appearing as payment method but when i enter credit card no. it gives error saying "Please enter a valid ...
1
vote
0answers
22 views

How to validate custom text field in magento checkout form

I have added custom checkout field in magento 2, and made it required, how can I add more validations and custom messages. Below is my code snippet to make it required: dataScope' => '...
0
votes
0answers
22 views

How to do password validation part without form (Magento 2)

I have a form which has password change functionality, the issue for a change I wrote my own controller and I change the button to type = 'button' from submit. Now how can I validate the password? I ...
0
votes
0answers
39 views

Magento 2.2.3 How to change validation message Or add new custom rule in system config field

I want to change default validation message in system config field. Below is my system.xml code. <field id="maxlabel" showInDefault="1" showInStore="1" showInWebsite="1" sortOrder="13" translate="...
1
vote
0answers
194 views

Magento 2 : How add validation validator to custom input field in checkout page?

We have to add custom form in check-money order payment method.We have to add custom validations before order placement but its not working. please check below code 1)Create the validator:- ...
2
votes
2answers
90 views

Magento 2.2.3 - Add custom required validation for company

I want to add validation only for billing address on the checkout page. By default in the backend, the company name is optional. But if when I go to the checkout page and click on the Place Order ...
1
vote
0answers
91 views

Magento2 : Grouped Product's child product add to cart issue

I have an issue in grouped product's child product add to cart validation issue. In one grouped product have three (3) child products while click on add to cart button of last child product without ...
1
vote
1answer
58 views

Magento 2 : How to put custom text in form validation?

I have this message when i validate post code How to change it? I tried overriding postcode-validator.js define([ 'jquery', 'mageUtils', 'Magento_Ui/js/model/messageList'], function ($, utils, ...
0
votes
0answers
27 views

How to show validation fail message?

I added a form to my site and a field which needs validation, this is the field: <input class="newsletterInput validate-length maximum-length-20 minimum-length-3" name="first_name" ...
0
votes
0answers
51 views

Quantity not getting validated (the way it should) for numbers between 1 - 9

I have problem with quantity increments, unable to increase the quantity for a product in the cart by increasing the quantity number in the input field, the input field for quantity does not seem to ...
0
votes
0answers
30 views

Magento2 : How to validate admin grid checkbox column?

I want to check before submitting admin form that any product is not selected in admin grid then it must generate error message in admin grid.
0
votes
1answer
41 views

Magento 2 Default form validation

How can i add pattern="[0-9]*" validation in my login form ?
0
votes
1answer
26 views

Customer Register Page Validate min 1 Char to 10 Charcters - Magento 2

I am trying to Change Validation in customer Registration page for first name and last name. I know i can do this by setting maxlimit by overriding core template in theme folder. vendor/magento/...
1
vote
1answer
36 views

How to add custom validation to checkout phone field

I have checkout_index_index.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/...
-2
votes
1answer
224 views

How to apply validation to customer address edit details in customer_index_index.xml

I want to validate the customers forms using the .xml UI validation.
1
vote
0answers
17 views

Login form validation is working but other forms validation is not working

I have tried all types of method but only login form validation is applying. But other forms not working. Even writing js in the phtml is not applying for the other forms. <form class="form form-...
1
vote
0answers
27 views

form validation is applying to login form but not for other forms

For me login form is working (used data-mage-init='{"validation":{}}' in form and minlength:6 ). But the same is not applying for the other forms <form class="form-address-edit" action="<?= $...
1
vote
0answers
20 views

Form Validation is not working for names and phone number min length

Hi I tried all standard method of validation like minlength:6, add data-mage-init='{"validation":{}}'in form and all standard tags. But validation is not working.Please anyone suggest me
2
votes
2answers
2k views

“Your session has expired” - Magento 2.2.7 fresh install

I've started out with Magento 2. Everything's working fine, except for Magento's formKeyValidator which isn't able to validate the incoming request. It's happening on the frontend. While adding a ...
0
votes
1answer
110 views

error “File Input” is required value Magento 2

I have a customer attribute that is "File Input", type is file and require is true but I do not let it show in customer register. When I try to create an account it displays the error like this: How ...
1
vote
0answers
46 views

What is the purpose of validation.xml file in Magento 2?

What is the purpose of validation.xml file in Magento 2? When and where do we use them ? I see there are couple of validation.xml files in Magento 2 directory. For example: vendor/magento/module-...
0
votes
0answers
20 views

Magento 1.9 validation.js - how to ignore disabled selectmenu

I have a problem regarding configurable products. There are multiple selectmenues. I have to disable some on certain situations, e.g. if a specific value was set in another select menu. Problem: If I ...
0
votes
2answers
384 views

Magento 2:Checkout phone number field should accept numbers plus special character like (-)?

In magento 2.1.X version checkout phone number should accept special character like (-) and should limit to 15 characters but currently it is accepting 10 characters only? I did searched the core but ...
0
votes
1answer
75 views

Magento2 Create account form custom field server side validation

I Added a custom sponsor name field on magento2 account creation form and done client side validation also. How can I do server side validation??? Need to check sponsor is available in database or not....
0
votes
1answer
268 views

Magento 2: Data validation message input field

I created an input box in Magento 2 and let the validator check the input value. That works perfect in the example below: <input id="input-gleich-breite-0" class="maximum-length-4 validate-...
0
votes
0answers
44 views

Custom validation customer telephone in registration, edit and checkout

I have to add a particular Regex to validate the customer phone number both in the frontend (via the validated js) and the backend side. I do not understand what is the most correct way to add a ...
0
votes
3answers
540 views

How to validate phone number for billing address in magento2.1.7?

How to validate phone number for billing address (should accept only number's and it should not exceed more then 10 digits) in magento2.1.7?