Skip to content

Idea to add custom validator for IP address vs prefix #280

Description

@tzarski0

We are using the IPv4/IPv6 addresses and prefixes a lot. The build-in YAMALE ip validator (for example, ip(version=4)) accepts both address (for example 10.0.0.1) and prefix (10.0.0.0/24). However in most cases we want to validate either address or prefix. The idea is to create custom validator for ip_address and ip_prefix so for example:

  • in prefix-list we can validate the prefix (e.g. 10.0.0.0/24 has both address and / subnet mask)
  • in logging/tacacs server ip we can validate the address (e.g. 10.0.0.0 has IP, but doesn't have subnet mask).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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