AnsPress_Validation::required( string $field )
Description #
Check if field is empty or not set
Parameters #
- $fieldstring (Required)
Source #
File: includes/class/validation.php
public function required($field) { if ( ! isset( $this->fields[$field] ) || '' == $this->fields[ $field ] ) { $this->errors[ $field ] = __( 'This field is required', 'anspress-question-answer' ); } }
Expand full source code Collapse full source code View on GitHub: includes/class/validation.php:71
Add your comment