Questions tagged [custom-validation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
34 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
16 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
18 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
49 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
27 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 ...
0
votes
0answers
20 views

Custom Password Validation in register.phtml

I know there are already a few answers for password validation, but I have a different issue here. I am following this answer added my custom validation, but its depends on store_config value, like ...
0
votes
0answers
74 views

Magento 2: Apply validation in product custom options field admin

I want to apply a custom validation to product custom option field. I'm using the validator rule but it's not getting bind. In overrided CustomOptions.php 'validation' => [ 'validate-number' ...
0
votes
0answers
30 views

Magento 2 add jquery for custom option when click add to cart button

I have product page where custom option are used of drop down type.There is a condition to extra checkbox validation when click it custom option should be required.I am looking to add custom jQuery ...
2
votes
0answers
302 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
44 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
234 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
49 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
1answer
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
58 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
370 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
2k 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 ...