ElxValidation.Internet (elx_validation v0.1.0)

email

  • The field under validation must be formatted as an email address.

    url

  • The field under validation must be a valid URL.

    ip

  • The field under validation must be an IP address.

    ipv4

  • The field under validation must be an IPv4 address.

    ipv6

  • The field under validation must be an IPv6 address.

data = %{
    email: "example@gmail.com",
    url: "http://google.com",
    ip: "192.168.1.1",
    ipv4: "192.168.1.1",
    ipv6: "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
  }
rules = [
    %{
      field: "email",
      validate: ["email"]
    },
    %{
      field: "url",
      validate: ["url"]
    },
    %{
      field: "ip",
      validate: ["ip"]
    },
    %{
      field: "ipv4",
      validate: ["ipv4"]
    },
    %{
      field: "ipv6",
      validate: ["ipv6"]
    }
  ]

Link to this section Summary

Functions

check Email Address

check IP Address IPV4 /IPV6

check IP Address IPV4

check IP Address IPV6

check Url Address

Link to this section Functions

check Email Address

check IP Address IPV4 /IPV6

check IP Address IPV4

check IP Address IPV6

check Url Address