src/Validator/Float.php
public function isValid($value)
    {
        $this->resetMessages();

        $this->value = $value;

        if (!is_numeric($value)) {
            $this->addMessage();

            return false;
        }

        $value = (string) $value;

        if (substr_count($value, '.') > 1) {
            $this->addMessage();

            return false;
        }

        $value = str_replace('.', '', $value);

        if ($this->allowNegative) {
            $value = ltrim($value, '-');
        }

        if (!ctype_digit($value)) {
            $this->addMessage();

            return false;
        }

        return true;
    }
public function isValid($value)
    {
        $this->resetMessages();

        $this->value = $value;

        if (!is_numeric($value)) {
            $this->addMessage();

            return false;
        }

        $value = (string) $value;

        if (substr_count($value, '.') > 1) {
            $this->addMessage();

            return false;
        }

        $value = str_replace('.', '', $value);

        if ($this->allowNegative) {
            $value = ltrim($value, '-');
        }

        if (!ctype_digit($value)) {
            $this->addMessage();

            return false;
        }

        return true;
    }
{@inheritdoc}