Field::validate_cb()
Description #
Parse validation callbacks.
Source #
File: lib/form/class-field.php
protected function validate_cb() {
if ( ! empty( $this->args['validate'] ) ) {
if ( is_array( $this->args['validate'] ) ) {
$this->validate_cb = array_unique( $this->args['validate'] );
} else {
$this->validate_cb = array_unique( explode( ',', $this->args['validate'] ) );
}
}
}
Expand full source code Collapse full source code View on GitHub: lib/form/class-field.php:209
Add your comment