The ValidateIP function only checks to make sure a given string is a valid IP. It doesn't check for ranges. If you get the string from a good place (e.g. API), there's no need to validate it.
To make sure the IP is within a given subnet, you'd probably want to split using WordFind, as in ValidateIP, and use IntCmp on each part to make sure it's within the wanted range. You could also convert the IP to a 32-bit integer and use good old masking with IntOp.