public function addInteger($field, $errorMsg = null, $emptyIsOk = true)
    {
        $const = ($emptyIsOk) ? self::VALID_INTEGER : self::VALID_INTEGER_REQUIRED;
        $this->addRequired($field, $errorMsg, $const);
    }
public function addInteger($field, $errorMsg = null, $emptyIsOk = true)
    {
        $const = ($emptyIsOk) ? self::VALID_INTEGER : self::VALID_INTEGER_REQUIRED;
        $this->addRequired($field, $errorMsg, $const);
    }
public function addInteger ( $ field , $ errorMsg = null , $ emptyIsOk = true ) { $ const = ( $ emptyIsOk ) ? self :: VALID_INTEGER : self :: VALID_INTEGER_REQUIRED ; $ this -> addRequired ( $ field , $ errorMsg , $ const ) ; }
Adds a required field and tests that it is integer only.

@param string $field
@param string $errorMsg
@param bool   $emptyIsOk Tells whether this can be submitted as empty (e.g. the validation tests only run if someone is actually submitted in the post.)
Adds a required field and tests that it is integer only .