pub fn validate_ip<T>(val: T) -> boolwhere T: AsRef<str>,
Validates whether the given string is an IP