In this article, I'll show you how to configure checkout validation. You will be able to use default WooCommerce checkout email validation for your custom fields.
WooCommerce Checkout Validation Plugin for you
First of all, you need a plugin for checkout fields. We created the complete solution for checkout fields management because WooCommerce lacks that crucial thing.
Our plugin's name is Flexible Checkout Fields. And people love it!
We have received a lot of positive feedback from users. Also, over 70,000 stores worldwide use this plugin on a daily basis!
People appreciate both features...
... and our support:
The plugin for checkout fields management should give you an option to:
- change fields' names,
- change the order of fields,
- create new, custom fields,
- add validation to fields,
- change fields' look.
Flexible Checkout Fields has all the features. Also, you can download this plugin for free!
Flexible Checkout Fields WooCommerce
Edit, add new or hide unnecessary fields from the checkout form. It's all about conversions and better user experience.
Download for free or Go to WordPress.orgYou'll love this simple interface
We decided to make it as much WordPress-style as we can. This design will be well-known for you as a WordPress/WooCommerce user.
Also, the design does not get in your way but helps you achieve your goals smoothly.
Due to our efforts, you will configure this plugin in a second!
Checkout validation at its finest
First of all, you have to know that WooCommerce has built-in fields validation. It can validate email, phone number or postcode.
Flexible Checkout Fields lets you use this default validation rules on your custom checkout fields. This way you can easily add WooCommerce checkout email validation to your custom fields.
Furthermore, you are able to use your own validation. Therefore, our users praise Flexible Checkout Fields as an efficient WooCommerce checkout validation plugin!
How to configure WooCommerce checkout email validation
You can configure WooCommerce checkout email validation in two ways. It all depends on your needs. You can:
- disable validation on default Email field
- add email validation to your custom field
You can find an option in the field's configuration:
There is a select box so you can simply select an option that you want:
- Default
- None
- Phone
- Postcode
A few WooCommerce default fields have built-in validation. Default validation works for Email, Phone and Postcode fields. These fields have the "Default" option turned on. You can turn it off if you need to (None option). This way you can disable default WooCommerce checkout email validation.
You can see the fields with built-in default validation below:
By default, it validates the field like this:
You'll see an error message as a result...
for an invalid email address.
You can use this WooCommerce checkout email validation for your custom fields.
Create your custom field and select Email from the select box in the field's configuration:
Let's try it. Enter invalid email addresses.
Finally, check out the result:
You can use phone and postcode validation in your custom fields in the same way.
Custom validation rules for developers
You can also add your own custom validation to Flexible Checkout Fields. If you are a developer or familiar with hooks and editing PHP code, it will be very easy. Learn how to add custom validation to WooCommerce →
Your custom validation will show up in the Validation select box as a result:
Are you ready to use WooCommerce checkout email validation in your store?
Finally, you have learned how to configure validation in the Flexible Checkout Fields plugin. This is a very powerful tool. However, Flexible Checkout Fields is not only a WooCommerce checkout validation plugin. You can use it to manage fields (including labels, placeholders or CSS classes), rearrange them or add new custom fields.
I hope this knowledge will help you with your store! If you have any questions, just use a comments section below.
PS. Maybe our WooCommerce Checkout Step-by-step Guide will be interesting for you?