Description #
This filter returns extracted validation rules from inputs.
apply_filters('fluentform/item_rules_' . $item['element'], $rules, $item);
Usage #
add_filter('fluentform/item_rules_' . $item['element'], function ($rules, $item) {
return $rules;
}, 10, 2);
Parameters #
- $rules (array) Value
- $item (array) Field Data
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\FormBuilder\FormBuilder -> extractValidationRule($item)