AnsPress_Validation::comma_separted_count( string $field, string $param )
Description #
Count comma separated strings
Parameters #
- $fieldstring (Required)
- $paramstring (Required)
Source #
File: includes/class/validation.php
private function comma_separted_count($field, $param) { if ( isset( $this->fields[$field] ) ) { $tags = $this->fields[$field]; if ( ! is_array( $tags ) ) { $tags = explode( ',', $tags ); } if ( count( $tags ) < $param ) { $this->errors[$field] = sprintf( __( 'It must be minimum %d characters', 'anspress-question-answer' ), $param ); } } elseif ( $param > 0 ) { $this->errors[$field] = sprintf( __( 'It must be minimum %d characters', 'anspress-question-answer' ), $param ); } }
Expand full source code Collapse full source code View on GitHub: includes/class/validation.php:114
Add your comment