Description #
This filter returns validation messages. Using this you can change the message of a specific rule.
apply_filters('fluentform/validation_message_'.$ruleName, $rule['message'], $item);
Usage #
add_filter('fluentform/validation_message_'.$ruleName, function ($message, $item) {
//do your stuff
return $message;
}, 10, 2);
Parameters #
- $message (string) Validation Message
- $item(array) Current Item
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)