Tribe__Validate::int()
validates a field as being an integer
The expected value is a whole number (positive or negative). This method is named "int" to match the mathematical definition of the word AND to closely match the pre-exiting method with a similar name: positive_int(). This method WILL validate whole numbers that go beyond values that PHP’s int type supports, however, if someone enters something like that, that’s on them. Smart people do smart things.
Source
File: src/Tribe/Validate.php
public function int() {
if ( preg_match( '/^-?[0-9]+$/', $this->value ) ) {
$this->result->valid = true;
} else {
$this->result->valid = false;
$this->result->error = sprintf( esc_html__( '%s must be a whole number.', 'tribe-common' ), $this->label );
}
}