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 [form-validation]

Denotes question related to form validation. form validation contain frontend forms, adminhtml forms, UI components based forms

0
votes
0answers
9 views

Which Magento-1 core function is good to use for my custom payment module in checkout page ( after clicking the place order button)

i need to validate order process method, which function is better to validate my code after press the place order button
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
1answer
34 views

TypeError: t.validator.methods[a] is undefined issue in jquery validation in magento2

I am facing this issue TypeError: t.validator.methods[a] is undefined after adding jquery validation in my form. Here is my validation code: <script src="http://ajax.aspnetcdn.com/ajax/jquery....
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
1answer
25 views

How to remove default validation from login and registration form in magento2.2.5?

I want to remove default validation from login and registration form and add my custom validation in magento2.2.5?
1
vote
0answers
9 views

How to add required validation on a particular filed in customer add form using JS?

I have created a custom field in customer add form using ui component. I want to add required validation to that filed using JS. Please help. Thanks in advance.
0
votes
0answers
24 views

Magneto 2 required attribute in custom payment option not working

I have a custom payment module with select options. I try to add 'required' to the option but it failed. I add 'data-mage-init' in tag and data-validate attribute in tag. Should I add anything on ...
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> ...
2
votes
1answer
37 views

only alphabet in firstname and lastname in customer registration form Magento 2

How can i add validations for only alphabets in First name and Last name fields in Customer registration form?
0
votes
1answer
36 views

Overriding the contact form module gets the fatal error in Magento2.2.5?

I have overriden the contact form module, after disabling the default contact form validation and apply my custom validation gets the following error: Fatal error: Uncaught TypeError: Argument 1 ...
1
vote
1answer
21 views

How to remove default contact form validation in Magento2.2.5?

I want to remove default contact form validation and add my jquery validation in contact form in Magrnto2.2.5? Any help would be appreciated.
0
votes
1answer
61 views

jQuery validation not working on pressing enter key in Magento2.2.5?

I have used jQuery validation, but it is not working on pressing enter key in Magento2.2.5? But works on Submit button. Refer my code. <script src="http://ajax.aspnetcdn.com/ajax/jquery....
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 ...
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 ...
1
vote
0answers
63 views

Magento 2.3. changing form validation options loses validation messages translations

I am running Magento 2.3. In the customer create account form I changed the way validation form errors are shown in this way: var dataForm = $('#form-validate'); dataForm.mage('validation', { ...
0
votes
2answers
50 views

“Telephone” is a required value not working in customer edit form

In my customer edit form, for telephone phone, required field validation is not working when I leave the telephone field blank. The required validation works for every field except for the telephone ...
3
votes
2answers
27 views

How to validate Magento 2 form field input value with database table field to find out if already exists?

I have added following affiliate email field (custom attribute) to the customer registration form. Now I want to validate that if value already exists in the database table. <div class="control"&...
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 ...
1
vote
1answer
27 views

Magento 1.9 - Add custom zipcode validation on Home page

Validate a zip code field on a home page popup in Magento 1.9 style might be using jquery button click.
0
votes
0answers
24 views

Found 2 elements with non-unique ID #email - V1.7.0.2

My customers just lost the ability to log into existing accounts and create new ones. On the login page when entering an email and password the page just refreshes, while a new registration gets the ...
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
55 views

Magento 2 - How to remove phone number validation in adminhtml

Magento 2 I want to remove phone number validation in customer addresses in admin panel --- Screenshot for your reference ----
5
votes
4answers
462 views

Magento2 How to add custom validation for password?

I want to change default validation for all password field. I want to change for all password field and validation is minimum 8 characters and at least one number include. Can anyone help me with ...
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/...
2
votes
1answer
76 views

How to validate form fields such as city, zipcode in address form

I have done form validation as follows <form class="form-address-edit" action="<?= $block->escapeUrl($block->getSaveUrl()) ?>" method="post" id="form-validate" enctype="...
0
votes
0answers
28 views

Shipping address, add new address form validation in checkout page

I want to set minlength for first & last name and also to the phone number. Also numbers only to the phone number and alphabets to the names in the form of shipping address that appears in ...
2
votes
1answer
149 views

Form Key Validation Error

So I have fixed my form key validation issues but my admin is still showing an error message. Important: Formkey validation on checkout disabled. This may expose security risks. We strongly ...
3
votes
1answer
160 views

Register password strength meter not working in Magento 2.2.5 CE

I have a fresh installation of Magento 2.2.5 CE & tried to create new user on frontend when we type password like Password1 strangely strength meter not showing like weak, strong, very strong its ...
0
votes
2answers
71 views

Validtaion is not triggers in custom form in magento 2

I have created custom form inside the popup. without filling the form, i am trying to submit,immediately it submits the data instead of validating the fields. Plaese provide me a solution. form.phtml ...
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 ...
0
votes
0answers
104 views

Custom form field not showing validation message

I have created one custom form and implemented magento validation. Magento validation works for all fields but message of one field is not displaying. I have added datepicker in this field. Below is ...
0
votes
1answer
142 views

Magento 1.9 change error placement of validation

I have the below code on my product view page: <input type="text" class="price required-entry input-text" name="price"> <span class="input-text-price-unit">INR</span> Since it has ...
0
votes
1answer
21 views

What is Validation class for Floating Point numbers

magento 2 have Validation clases for admin forms Like this for integer. What is for floatting numbers like 12.00 or 23.33 <item name="validate-integer" xsi:type="boolean">true</item&...
0
votes
2answers
180 views

Ajax request from key validation in magento 2

I need to done an ajax request in Magento 2. But for security purpose, I need to check XSS attacks all possible case. In Magento 1 form key validation and in Magento 2 form key validation is quite ...
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
0answers
17 views

How to add validation server side magento 2

I have created some custom attributes and i need to add validation server side. For example attribute1 must be just letter and attribute 2 must be a valid url how to do that please
0
votes
1answer
92 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 ...
1
vote
1answer
223 views

magento 2 - add max length for input fields in Review & Payments/billing form

I am trying to limit number of allowed characters on Firstname input field in my payment methods on Review & Payments area. I am using the magento default check/money order payment method. ...
1
vote
0answers
71 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
0answers
14 views

Add further checkout form validation Magento 2

I am using Magento 2 and the checkout form is allowing people to enter spaces rather than characters for fields like 'address'. How do I add further validation checks to the checkout form ...
2
votes
1answer
377 views

Magento 2 add maxlength in form ui component

I know magento give max_text_length validation for validating length & print error message regarding it, but I want to add attribute in my input field as maxlength="5" so i can stop user to adding ...
1
vote
0answers
21 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....
2
votes
2answers
76 views

Server side validation in magento forms

I have created a form in cms page and direct it submit action to a controller how to do server side validation and save data to my database app/code/Dyode/Pricebeat/view/frontend/templates/pricebeat....
1
vote
0answers
220 views

Magento2: Add date-from validation for dob (date of birth) field in customer creation

I want to limit the dob field in account creation form to be not less than 01/01/1900. I thought 2 way: - limit the calendar widget (but maybe someone could input the date directly) - add a ...
2
votes
1answer
375 views

Magento2 : Credit card validations on a custom form not working

I am trying to add Credit card validations on Custom payment form <form id="testForm" data-mage-init='{"validation":{}}'> First name:<br> <input type="text" ...
0
votes
2answers
359 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
88 views

Checkbox validation

I want Checkbox required field I agree to the Terms and Conditions. I am using this code but it's not working.
0
votes
1answer
147 views

Magento 1 Custom form validation is not working

I try to validate my form but it doesn't work and i don't know why. Please help me to find problem. Thanks <form action="<?php echo $this->getUrl('vendor/addproduct/new') ?>" method="post"...