acf/validate_value/key=(key) хук-фильтр . ACF 5.0.0
Filters whether the value is valid.
Использование
add_filter( 'acf/validate_value/key=(key)', 'filter_function_name_3155', 10, 4 ); function filter_function_name_3155( $valid, $value, $field, $input ){ // filter... return $valid; }
- $valid(true/false)
- The valid status. Return a string to display a custom error message.
- $value(смешанный)
- The value.
- $field(массив)
- The field array.
- $input(строка)
- The input element's name attribute.
Список изменений
С версии 5.0.0 | Введена. |
Где вызывается хук
acf/validate_value/key=(key)
acf/includes/validation.php 393
$valid = apply_filters( "acf/validate_value/key={$field['key']}", $valid, $value, $field, $input );