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
2 answers
31 views

Field number validation

I need to validate a field in a custom form. The field should be not required, and should validate if the content entered in it are numbers. I added the validation on the form which works. What does ...
user avatar
  • 27
0 votes
1 answer
23 views

How to translate Validation field name in magento 2

how to translate the field name in magento 2 that comes in %
user avatar
  • 1
0 votes
0 answers
23 views

Magento 2 REST API Add validation for data interface payload

I have created a custom REST API to save data into my table. My table contains many fields so I am using the DataInterface structure for payload. Now I need to add a validation like as below { "...
user avatar
0 votes
1 answer
69 views

Adding custom validation for vat_id in the checkout

I have this plugin: public function afterProcess( LayoutProcessor $subject, array $jsLayout ) { ... if(isset( $jsLayout['components']['checkout'][...
user avatar
  • 3,535
0 votes
0 answers
20 views

Sorry, but the data is invalid or the file is not uploaded

I am facing an issue when I am trying to do import in admin panel but I getting an issue "Sorry, but the data is invalid or the file is not uploaded" and when I debug the issue I found that ...
user avatar
0 votes
0 answers
9 views

Magento 2 Cannot continue to payment step

Hi I have converted my shipping address city field into a dropdown using the help of https://magento-qa.com/how-to-change-city-field-to-a-dropdown-in-checkout-step-magento-2 As mentioned in the link ...
user avatar
0 votes
0 answers
35 views

How i can change email validation magento 2

When customer go to create account (phat : /customer/account/create/) the email validation fail in this case daniel@example.cm, how i can change this validation to improve this ?.
user avatar
0 votes
1 answer
71 views

Magento 2: Custom Checkout Field Validation

I have a module already built for ExtraFee, I just want to add the checkbox below for terms & conditions so I found a template and added a checkbox like this: <div class="field amexfee-...
user avatar
0 votes
1 answer
33 views

Remove field validation and make field optional in the form

Is there a way to validate form fields, that should remain "optional" (not required)? Even if I set "required" to false in both cases (required or not), Magento nags at the ...
user avatar
  • 3
0 votes
1 answer
66 views

error on import "The source file moving process failed" magento 2

I am getting the error "The source file moving process failed." when trying to perform any type of import. I have tried catalog re-index, tried changing the file, been searching but cant ...
user avatar
0 votes
3 answers
60 views

Magento 2 : add extra validation rules for an existing shipping carrier

This question is about javascript carrier validation in the checkout page. Depending on the validation result, some carriers may disappear from the displayed list if validation failed for them. I ...
user avatar
0 votes
1 answer
113 views

Please enter a valid credit card type number

we have Magento 2.25 and recently it stopped accepting credit cards. We were originally using authorize.net and when a user enters a credit card number it comes back with an error that says "...
user avatar
0 votes
0 answers
59 views

Remove form loader or spinner in shipping address one page checkout

How do I remove the page loader or spinner when user entered value in the field i.e Phone Number field? I believe this is the default design by Magento to check on the validation part or making ajax ...
user avatar
  • 1
0 votes
0 answers
39 views

Magento 2 : Disallow Specific Phone Number

We would like to disallow some specific phone numbers, especially in the checkout. For example the phone number: 0000000000 or 1111111111. How can we disallow these phone numbers?
user avatar
  • 1,474
0 votes
2 answers
559 views

Magento 2 does not allow Special characters in First Name & Last name even though the Input Validation is None

In my magento setup I am not able to insert special characters for customer First name and Last name. The Input Validation for Customer Attribute First Name and Last Name is NONE. But still Magento 2 ...
user avatar
0 votes
0 answers
24 views

Magento 2 Klarna Checkout Validate class not found from basename 'NotEmpty'

I have installed magento2 klarna checkout in my system but getting below error. any one have idea how i can solve this ?
user avatar
0 votes
1 answer
50 views

Magento 2 code validation "Unescaped output detected." when calling Product Attributes in phtml

I've created Magento 2 modules, now when I trying to validate my code with Magento code validator and I`m getting 'Unescaped output detected' in phtml templates where calling custom HTML attributes. ...
user avatar
0 votes
0 answers
20 views

Edit Customer Address Field To Accept Custom Format

I am developing using Magento2.3.5-p2 on Ubuntu 20.04 I am required to edit the customer account details as per below Description of the above image is as below The first and last name will be ...
user avatar
1 vote
1 answer
78 views

Magento 2 Custom adminhtml validation rules doesn't work

Custom adminhtml validation rules from Magento 2 docs on purely installed Magento 2.4.3 and Magento 2.4.2 doesn't work. Vendor/Module/view/frontend/requirejs-config.js var config = { config: { ...
user avatar
  • 228
1 vote
2 answers
294 views

Magento 2 - Dynamic custom validation error message not working

i'm using Magento 2.4.1 and i add custom validation with a custom error message to detect which character is wrong and add it to the message: define([ 'jquery' ], function ($) { return ...
user avatar
  • 167
0 votes
1 answer
325 views

How to validation CSV import in magento 2

I have Create custom CSV import functionally. But How to check which row data is blank and i want to show error like :- Required field is empty in row(s). So Please help me how to check which row is ...
user avatar
  • 3,157
1 vote
1 answer
2k views

In InstallCommand.php line 274: Parameter validation failed

I have problem installing magento 2.4.2 It shows me an error (In InstallCommand.php line 274:Parameter validation failed ) Help me Thanks php bin/magento setup:install --base-url=http://127.0.0.1/...
user avatar
0 votes
0 answers
146 views

Magento 2: How To Add Validation In Admin MultiSelect Field

I add a custom admin filed in custom form, it's a multi-select category field. I just want to make this field required. phtml <div class="field required"> <label class="...
user avatar
3 votes
2 answers
545 views

Magento2 checkout: add required checkbox, required validation not working

I am trying to add a required checkbox to the checkout summary of magento2, above the submit order button. I have managed to place the checkbox, but the order can still be submitted even if the ...
user avatar
  • 141
0 votes
0 answers
77 views

Magento 2 add custom field in checkout place order

Need to add new custom validation on the checkout page before place order. The place order should work only when the calculation shown above is correct and also to show different values to sum. I ...
user avatar
  • 828
-1 votes
1 answer
170 views

How to remove checkbox for GDPR in Magento 2

I want to remove GDPR checkbox in Magento 2 Login Page. I want to remove that checkbox from login page it will come from ( app/design/frontend/Mgs/claue_child/MGS_GDPR/templates/customer/form/login....
user avatar
  • 526
0 votes
1 answer
96 views

Magento2 - Add customer attribute field validation in back end

How to add customer level Custom attribute field validation like Validate that end date is greater than the start date from the backend.
user avatar
  • 3,121
0 votes
1 answer
210 views

Magento 2 - No error message showing on required unchecked checkbox

I added this required input to the contact form: <input type="checkbox" name="privacy_policy" id="privacy_policy" value="1" data-validate="{required:...
user avatar
  • 2,380
0 votes
1 answer
99 views

How can I set custom validation using controller in system config file in Magento 2?

I want to set custom validation on system config file that "accept character do not allow any script tag" only accept like that ex. config/group/field, config/group/field Here is my ...
user avatar
0 votes
1 answer
83 views

Without select shipping address , click on place order validation not showing Magento 2 checkout page

I have issue on place order without select shipping address or save shipping address ,click on place order validation not showing in page , showing error like below , how to handle this in Magento 2? ...
user avatar
0 votes
0 answers
24 views

All address field validation in customer account page

I need to do validation on server side on customer account page.That is, edit address I can validate id=street1(inspect address field1),working fine.How to validate for other address fields - street2 ...
user avatar
  • 1
0 votes
1 answer
135 views

Magento 2 - Show validation message in custom container on product update page

I try to show the validation message which shows if you enter a wrong value (for example 0) and try to add the product to the cart, in a custom place. I try to do this on the product update site, ...
user avatar
  • 2,380
0 votes
2 answers
417 views

How to edit the change password validation message for customer in magento 2?

suppose , after a customer login into the website(you may need to sign up first as a customer), after a customer login then he click on change password option from the drop down , he will reach a ...
user avatar
0 votes
1 answer
34 views

Changing Validation Text at change password page in magento2

I want to change or edit the validation text(Minimum length of this field must be equal or greater than 8 symbols. Leading and trailing spaces will be ignored.) at change password page also shown here ...
user avatar
0 votes
1 answer
266 views

How to translate validation error message in checkout page Magento 2.3

Please any Ideas on how to translate the validation message on phone field on view/frontend/layout/checkout_index_index.xml: <item name="telephone" xsi:type="array"> <...
user avatar
1 vote
1 answer
74 views

Magento 2: Reset Password is taking previously used password

When checking the Reset Password in Magento, I can see that there is no validation when using the new password with already used passwords. Is this the default functionality in Magento or is there any ...
user avatar
  • 460
0 votes
1 answer
39 views

Magento 2 remote validation, how to show loader

How to add showLoader option in this call? data-validate="{required:true, 'validate-email':true, 'remote':'<?= $emailValidatorUrl ?>'}"
user avatar
0 votes
1 answer
86 views

Magento2 validate billing & shipping address before place order

How can I validate billing & shipping address form before place order. I have a payment method before place order I want to validate it. using js. Just like submit it form to display required ...
user avatar
  • 3,426
0 votes
1 answer
78 views

Add custom checkout address validator

for our customer I've to create a custom validation for a field in the shipping-address-fieldset. For that I've created a custom module in /app/code. The js requirement works but the validation doesn'...
user avatar
  • 105
0 votes
0 answers
112 views

Magento 2 Custom Form Validation Not Working

I have built a custom CMS form page in Magento 2 that sends an email with the results. The form loads correctly, and the email is generated correctly, but the form validation is not working. If the ...
user avatar
0 votes
1 answer
143 views

Magento 2 - Serverside Validation

In magento 1 we could use Zend to validate input values, for example check if the value is an e-mail or an integer. Example if (!Zend_Validate::is($email, 'EmailAddress')) { ... } How does it work in ...
user avatar
  • 2,380
0 votes
2 answers
285 views

{"exception":"[object] (Magento\\Framework\\Validator\\Exception(code: 0): One or more input exceptions have occurred

I'm getting the following issue since today, i'm not able to find out what is going on. It was all working fine for the past few months, and no files was modified recently. What could be the problem? (...
user avatar
0 votes
1 answer
167 views

Validate cart before placing order

I'm trying to find the best practice in order to do a cart validation before an order is placed. if the cart meets my requirements the order should proceed. If not it should show a custom error ...
user avatar
  • 1,097
1 vote
0 answers
341 views

How to show error message for checkbox on checkout page in Magento 2?

I have created some steps in Magento 2 and added a checkbox on one step and added required validation for the same. Validation works perfectly if it is not checked it will not go further but if it is ...
user avatar
  • 526
0 votes
0 answers
70 views

How to Add Custom Validation on Magento 2 Admin?

I have created some fields in Magento 2 Admin I want to add some custom validation in Admin Area. If I add 200 in Product Cost Column in first row then I want to add 201 in next row if i add value ...
user avatar
  • 526
0 votes
2 answers
959 views

How to add validation on checkbox , select option and text fields in magento 2?

I have created 3 steps between review and Payment page in Magento 2. But how to add validation on those fields which are ( checkbox , select option and text fields ) will anyone suggest anything for ...
user avatar
  • 526
0 votes
2 answers
510 views

Display validation error on page load on checkout page

Is there any way I can display the validation message 'This is a require field' on page load on checkout page?
user avatar
  • 81
3 votes
0 answers
42 views

Magento 2.3 How to validate all checkout fields at once

Is it possible to validate all fields in the checkout at once? Currently, if you dont fill in anything, only the email field will be validated. All the other fields are only validated if the email ...
user avatar
  • 500
1 vote
0 answers
83 views

How do I prevent empty checkout fields from being validated on page load?

I am using Magento 2.3.5 and Amasty's "One Step Checkout" module. Amazon Pay is also present. When viewing the checkout page, it seems something is trying to validate the <input> ...
user avatar
0 votes
1 answer
170 views

JS VarienForm in Magento 2

Is there a way to update this code to work with Magento2? I believe VarienForm has been depreciated in Magento2 but I can't find a similar JS constructor to get the object. var AddToCartForm = new ...
user avatar
  • 163

1
2 3 4 5
9