You appear to be a bot. Output may be restricted
Description
Validate the fields in the form
This is the validation of the main fields: Title, Content, and the custom fields If the form doesn't have certain fields, such as post_title, then we need to ensure that the final validation sets the values that are missing.
Usage
$bool = bw_validate_fields( $format, $fields, $validated );
Parameters
- $format
- ( string ) required – the expected format of the set of fields to be validated
- $fields
- ( array ) required – array of custom post type field names expected
- $validated
- ( array ) required – array of validated fields
Returns
bool true if validation was successful
Source
File name: oik-fields/shortcodes/oik-new.php
Lines:
1 to 9 of 9
function bw_validate_fields( $format, $fields, &$validated ) { $fs = str_split( $format ); $valid = true; foreach ( $fs as $f ) { $valid &= bw_call_validate_function( $f, $fields, $validated ); } $valid = apply_filters_ref_array( "oik_add_new_validate", array( $valid, $format, $fields, &$validated ) ); return( $valid ); }