How to do Confirm Field Validators in Checkout field Editor for WooCommerce?
Make easy customisations to your checkout form with Checkout Field Editor for WooCommerce plugin. Add, edit, modify, delete, or change the display order of checkout fields with this easy WooCommerce checkout manager. Besides adding custom fields, create and include custom sections to your WooCommerce checkout form. Functioning hand-in-hand with the WooCommerce Multistep Checkout plugin from ThemeHigh, create custom checkout steps and include custom fields and sections to these steps using the Checkout Field Editor.
Confirm field validators come handy while there is a particular field which to be compared with another field to ensure they match. Please follow the simple steps given below to set up a confirm field validator.
To create new custom validators,
- Go to Checkout Form > Advanced Settings page.
- Setup a new confirm field validation rule as in below example screenshot.
- Validator Name: A unique name for the validation rule, which will be used internally to identify the validator.
- Validator Label: The display name for the validation rule.
- Field Name: The field which the value has to be compared with.
- Error Message: The message to be displayed when the validation fails. Use %s to include field name in validation messages.
- Save settings.
- Newly created validators will be available to choose in Validations drop-down.
- Confirm field validators will trigger only when there is value in the confirmation field. So please mark the confirmation field as required.