code: public static int validateNetworkPrefixLength(IPVersion ipVersion, CharSequence networkPrefixLength) throws PrefixLenException {
  		try {
  			return Validator.VALIDATOR.validatePrefix(networkPrefixLength, ipVersion);
  		} catch(AddressStringException e) {
  			throw new PrefixLenException(networkPrefixLength, ipVersion, e);
  		}
  	}
docs: Validates that the string has the format "/x" for a valid prefix length x.
  @param ipVersion IPv4, IPv6, or null if you do not know in which case it will be assumed that it can be either
  @param networkPrefixLength the network prefix length integer as a string, eg "24"
  @return the network prefix length
  @throws IncompatibleAddressException if invalid with an appropriate message