<?php

namespace ModulesGarden\Servers\ZimbraEmail\App\Validators;


use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Validators\BaseValidator;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Validators\boolen;

/**
 *
 * Created by PhpStorm.
 * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
 * Date: 08.11.19
 * Time: 10:18
 * Class IntegerValueValidator
 */
class IntegerValueValidator extends BaseValidator
{

    /**
     * @var bool
     */
    protected $disableNegative = false;

    /**
     * IntegerValueValidator constructor.
     * @param bool $disableNegative
     */
    public function __construct($disableNegative = false)
    {
        $this->disableNegative = $disableNegative;
    }

    /**
     * @return bool
     */
    public function isDisableNegative()
    {
        return $this->disableNegative;
    }

    /**
     * @param bool $disableNegative
     */
    public function setDisableNegative($disableNegative)
    {
        $this->disableNegative = $disableNegative;
    }



    /**
     * return true if data is valid, false if not,
     * add error messages to $errorsList
     *
     * @param $data mixed
     * @param $additionalData mixed
     * @return boolen
     */
    protected function validate($data, $additionalData = null)
    {
        if(is_numeric($data))
        {

        }

    }
}