public function getRegex()
    {
        switch ($this->decimalPoint) {
            case self::DECIMAL_COMMA:
                $regex = '/^-?\d+(,\d+)?$/';
                break;

            case self::DECIMAL_POINT_OR_COMMA:
                $regex = '/^-?\d+((\.|,)\d+)?$/';
                break;

            case self::DECIMAL_POINT:
            default:
                $regex = '/^-?\d+(\.\d+)?$/';
                break;
        }

        return $regex;
    }