You appear to be a bot. Output may be restricted
Description
Implement 'bw_field_validation_checkbox' filter for oik-fields
Validate to be set or not set.
Usage
$$string = oik_fields_validation_checkbox( $value, $field, $data );
Parameters
- $value
- ( string ) required – the value of the field from the $validated array
- $field
- ( string ) required – the field name
- $data
- ( array ) required – the field's registration data
Returns
$string The validated / sanitized value
Source
File name: oik-fields/includes/oik-fields-validation.php
Lines:
1 to 11 of 11
function oik_fields_validation_checkbox( $value, $field, $data ) { $valid = array( 0, 1 ); $checkbox = bw_array_get( $valid, $value, null ); if ( null === $checkbox ) { bw_issue_message( $field, "bw_invalid_checkbox", __( "Invalid checkbox" ), "error" ); } else { bw_trace2( "!$checkbox!", "checkbox?" ); } return( $checkbox ); }