You are here

private function IpAddress::isIpAddress in IP address fields 8

Same name and namespace in other branches
  1. 2.0.x src/IpAddress.php \Drupal\field_ipaddress\IpAddress::isIpAddress()

Checks if the given IP is valid.

2 calls to IpAddress::isIpAddress()
IpAddress::inRange in src/IpAddress.php
Checks if the stored IP is within $min and $max IPs.
IpAddress::parse in src/IpAddress.php
Find if the value given is an IP, IP range, or other.

File

src/IpAddress.php, line 97

Class

IpAddress
IpTools class.

Namespace

Drupal\field_ipaddress

Code

private function isIpAddress($ip) {
  return filter_var($ip, FILTER_VALIDATE_IP);
}