cast ip value to string before using string methods
cast ip value to string before using string methods

necessary since the value may be an IPAddr (eg when using a native ip
address type in postgres)

franckverrot/activevalidators,andela-kndungu/activevalidators,bcm/activevalidators,franckverrot/activevalidators