Tribe__Validate::not_empty()

Validates a field as just “not empty”.

Contents


Source

File: src/Tribe/Validate.php

		public function not_empty() {
			$this->value = trim( $this->value );

			if ( empty( $this->value ) ) {
				$this->result->valid = false;
				$this->result->error = sprintf( esc_html__( '%s must not be empty', 'tribe-common' ), $this->label );
			} else {
				$this->result->valid = true;
			}
		}

Top ↑

Changelog

Changelog
Version Description
4.7.6 Introduced.