Skip to content

check(CLI::ValidIPV4) Does Not Account For Trailing Period #1191

@adachng

Description

@adachng

Description

If I have the code:

        CLI::App app;

        std::string address_str;

        app.add_option("-a, --address",
                       address_str,
                       "IPv4 address of server")
            ->required()
            ->check(CLI::ValidIPV4);

and I run the app with ./main -a 127.0.0.1., the validator allows this when this is not a valid IPv4 address.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions