Description #
This filter is available before showing validation errors.
apply_filters('fluentform/validation_errors', $errors, $formData, $form, $fields);
Usage #
The following would apply to all forms:
add_filter('fluentform/validation_errors', function($errors, $formData, $form, $fields){
return $errors;
}, 10, 4);
Parameters #
- $form (Object) The $form Object
- $errors (array) Errors
- $formData (array) Form Data Array
- $fields (array) Form Fields
Placement #
This code should be placed in the functions.php file of your active theme.
Source Code #
This filter is located in FluentForm\App\Services\Form\FormValidationService -> validateSubmission(&$fields, &$formData)