Tribe__Validate::positive_int()
validates a field as being positive integers
Source
File: src/Tribe/Validate.php
public function positive_int() {
if ( preg_match( '/^[0-9]+$/', $this->value ) && $this->value > 0 ) {
$this->result->valid = true;
} else {
$this->result->valid = false;
$this->result->error = sprintf( esc_html__( '%s must be a positive number.', 'tribe-common' ), $this->label );
}
}