Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
0answers
39 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
13 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
29 views

Magento 2 Default form validation

How can i add pattern="[0-9]*" validation in my login form ?
0
votes
1answer
21 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
24 views

How to add custom validation to checkout phone fild

Good day. 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:...
-2
votes
1answer
27 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
14 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
22 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
9 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
0
votes
0answers
270 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
20 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 ...
0
votes
0answers
20 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
12 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 ...
-1
votes
0answers
18 views

Magento 2 How to use pattern validator js for frontend validation on attribute

In UpgradeData i added an attribute with email validation which works by setting the attribute frontend_class to the proper validator 'frontend_class' => 'validate-email', but with pattern i ...
0
votes
2answers
30 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
40 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
62 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
23 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
191 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?
0
votes
1answer
39 views

Magento 1.9 contact form validate required not working

For some reason our select dropdown is not required and does not validate the entry. It already contains the class 'required-entry' for the select. What am I missing here? <form action="<?php ...
0
votes
1answer
64 views

Error message display using js in backend

I want to display an error message on the form/listing in magento 2 back-end. I know how to show those message using a controller. But how can i achieve same with JavaScript.
1
vote
0answers
37 views

How to remove validation from the “City” and “Street Address” Field on Customer Registration Page?

I've added "Address Information" on customer registration page & want to remove the mandatory field from the "City" and "Street Address" Field for that I've overrided register.phtml file on my ...
0
votes
1answer
44 views

Add to cart glide image animation | Fly to cart image animation. PHP/jQuery/JavaScript validation on successfully adding product to cart

I am trying to make a simple glide animation when adding product to the cart to indicate and "highlight" that the product was added. I managed to create a simple (not the best) glide animation for ...
0
votes
0answers
17 views

Magento 2: customer sign up data validation by reading csv

I have customized Magento 2 customer signup form for a card ID. Is there a way that I can read CSV that includes millions of customer_id and privilge_crd_nu and validate by the time of user signs up.
0
votes
1answer
112 views

Magento 2 How to add custom validation rules and apply them?

I'm trying to modify some validation rules for the State input in shipping address. I want to add an error message if user selects 'Texas'. I created a mixin for Magento_Ui/js/lib/validation/rules in ...
1
vote
0answers
18 views

Translating Error Messages on Address Form

When only entering a few Required Fields when logged in and Adding a new address. And then submitting that form, the error messages come back in English and not the translated format that is required....
6
votes
2answers
467 views

Magento 2.2.5: How to validate shipping address

I'm doing Custom Checkout, and here is what i've done til now. The adea is to use validate so when i click on "Next" button, it gonna check if the checkbox in "Terms of Use", if its checked, then it ...
0
votes
1answer
86 views

Magento 2 how to add extra validation to new Billing address form fields in checkout page

i want to put some extra validation to billing address form in checkout page. When a customer in payment page and wants to add new billing address , i want to add few validations to First Name, Last ...
1
vote
0answers
19 views

Magento2 use default password validation in custom module

Can anyone let me know how to use default magento server side validation for password field in my custom module password string?I have dealer registration form and i have password field there and i ...
0
votes
2answers
112 views

Select validation in magento2

I am using magento2.1 If I am using class="validate-one-required-by-name and validate-select" it's not working. <div class="control" style="margin:10px"> <select id="myselect" name="...
0
votes
1answer
25 views

Magento 2 stop Magento updating the SKU on duplicate

When I try to create a product with an SKU the same as one that already exists Magento allows the creation but changes the SKU to be xxx-1. Is there a way to stop this?
1
vote
0answers
41 views

Magento 2 : Drop Down validation

<div class="field"> <fieldset class="fieldset create account" data-hasrequired="<?php /* @escapeNotVerified */ echo __('* Required Fields') ?>"> <legend class="...
1
vote
1answer
262 views

Validate Date range in backend from in magento 2

I have added datepicker in magento2 backend form using following code. protected function _prepareForm() { $fieldset->addField( 'date_started', 'date', [ 'name' ...
0
votes
0answers
41 views

Magento 2 Custom Product Validation

When creating a product I need to make a call to our stock system to make sure that the SKU entered in Magento exists in our stock system. Please, could someone advise the best process for this? I ...
1
vote
1answer
168 views

Magento 2 Custom Validation Rule

I want to validate a custom-category-attribute with regex, when I modify it in backend. Therefor I want to customize validation/rules.js src/vendor/magento/module-ui/view/base/web/js/lib/validation/...
3
votes
1answer
52 views

Magento 2 - Removing Tax with VAT Validation on Prices that Include Tax

We have our catalogue set up so that prices entered in the admin include tax, for example: £75.00 (excl tax: £62.50) During the checkout we also allow people to enter their VAT number which removes ...
0
votes
1answer
220 views

Digits Range Validation in the UI-form

How to add digits range validation rule to the input field inside the UI-form?
3
votes
2answers
144 views

Magento 2 : Specific Range Validation in system configuration field

I'm new in magento. I develop one module in Magento 2.2.2. I want to do like that in system configuration that, user can enter value between 0 to 100 in that field. User can't enter text value and ...
4
votes
1answer
470 views

Magento 2.2.4 Show error message returned by plugin

I'm beginner to Magento2 and I want to validate pincode which exists in custom table or not on Checkout page (www.test.com/checkout/), according to that I want to display error message on same page. ...
2
votes
1answer
96 views

Custom Checkout Validation - Two fields must have the same value : M2

I have read this URL for equalTo validation. I have add custom field using LayoutProcessor.php file and set validation like this : 'validation' => ['validate-no-empty' => false,'validate-...
0
votes
0answers
55 views

Ajax add to cart not getting a correct price in minicart

I have some problem when I auto add a product on product pages as below: click add to cart a product with ajax. I allow auto add another product after class validator in function process. Example ...
2
votes
2answers
210 views

Magento2 Remove all password validation

I've tried removing data-validation Tag from password input but it didn't work for Reset Password, New Password, and Change Password.
4
votes
2answers
132 views

System Configuration field Validation

I want to Validate Max-limit in system configuration field. i have used some of classes for other validation but did not found any class for max or min text limit for system configuration filed.
0
votes
0answers
20 views

Validation in product Customizable options?

We have a need to limit the characters entered in a text field in a particular product's custom options. (it is for adding text embossing on the product, and we have to limit it to the characters ...
0
votes
1answer
385 views

Checkout email domain validation

In magento checkout, if the customer's email domain is not valid, the order is normally completed, using email.example.com as custome email. I have found that there's a list of allowed email domains ...
0
votes
0answers
28 views

How to fix error in magento 1.9?

In bundle product when we click on save button at that time we get the validation error message like "Please enter a number greater than 0 in this field." How can we remove that validation message? ...
0
votes
1answer
197 views

Magento1: VAT Validation using EU VIES service

Magento is using EU VIES (VAT Information Exchange System) service to validate the VAT-IDs (http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl) Is it reliable and how Magento is using it?...
0
votes
0answers
59 views

Magento 2 : admin form image file validation not working in server

In my form i am using this code to upload the file. $fieldset->addField( 'banner_image', 'image', [ 'name' => 'banner_image', 'label' => __('...
0
votes
2answers
2k views

Magento 2 Checkout post code (zip code) is not a required filed

I want to make the postcode filed a required filed in the checkout process. I am sure that by default, this IS required but for some reason, it isn't in my store. I know there is entry in vendor/...
0
votes
0answers
20 views

validate zip code only when whole zip has been entered

I am trying to change the validation on my zip code so that instead of validating on every key press , it will validate once the user has input the full zip code (5 numbers) , or if the user leaves ...