Questions tagged [custom-validation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
71 views

Magento 2 + Checkout Billing address Telephone Number Validation

I have created a plugin for billing address phone number validation, but it's giving me an error Exception #0 (Exception): Notice: Undefined index: dataScopePrefix in /var/www/html/test/vendor/magento/...
0
votes
0answers
35 views

Magento 2: How to add validation in Custom Component Extend

How to add custom validation in component extend element magento2 where value is required and it must be a URL below is the js component extend snippet define( [ 'uiComponent', '...
0
votes
1answer
62 views

Custom validation for Phone number in Magento 2

I have created the custom validation method to validate telephone number to accept only numbers and (- symbols. It's working when I tried with JavaScript in HTML page but not working when applied to ...
0
votes
0answers
35 views

Magento 2: Custom validation on custom UI grid

I want to add a custom validation on my custom UI grid. Logic is that the Max qty must be greater than the Min qty. This is working fine for the UI form, but not working for UI grid mass action. ...
0
votes
1answer
25 views

How to add a green border if validation is completed when submitting the form

Magento 2 has basic validation if the field is not valid. How to add custom validation to the checkout page which will add a green border and an inscription that notifies the user of a successful ...
0
votes
0answers
131 views

Magento 2 custom checkout select field shippingAdditional add or remove require-entry upon selected shipping method

If Free Shipping Method is selected change validation E.G:'validation' => ['required-entry' => false], ... 'custom_field' => [ 'component' => 'Vendor_Module/js/custom-field-component',...
0
votes
0answers
29 views

Magento 2: How to create custom validation method

I have 2 fields for Month (both fields type is number), first one is for "From Month" and second is "To Month". I want to restrict user to enter the less no. of month in "To Month" field as ...
2
votes
0answers
660 views

Magento2 : Custom Sales Rule condition and validation

I am using this article to create custom condition in cart rule where I want to add the stock qty including other product attributes in rule condition. For example if product_attribute1 = Adidas and ...
6
votes
2answers
52 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
398 views

Magento 2: Onepage checkout shipping address ZIP Code custom data validation. Zip codes from the databse

I am absolutely new with Magento. Have basic knowledge with custom modules and front-end layout updates. I need to insert a custom validation for the ZIP Code in my checkout page (One-page checkout). ...
0
votes
1answer
56 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-...
3
votes
2answers
2k views

Magento2: custom validation Error “Uncaught TypeError: Cannot read property 'call' of undefined”

In my custom validation rules shows ' Uncaught TypeError: Cannot read property 'call' of undefined' errors!!!... . how can i do custom logic and proper validation ? Here is my Code app/...
4
votes
0answers
78 views

How to add custom validation on checkout page before shipping method rendering in magento 2

How to add custom validation on checkout page before shipping method rendering and if validation success then only show shipping methods or else show error message. I have already implemented this ...
0
votes
2answers
694 views

Validation for file type not working in File Upload in Magento 2 Store Configuration

I am following below Article to upload file in store configuration: https://www.mageplaza.com/devdocs/how-file-upload-sytem-configuration-magento-2.html I have defined custom backend model as ...
8
votes
3answers
3k 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 ...