# validate4() function · @imqueue/net

Source: https://imqueue.org/api/net/latest/net.validate4/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/net 3.0.2 — generated reference, not hand-written

Asserts that a string is a valid IPv4 address.

**Signature:**

```typescript
export declare function validate4(ip: string): void;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| ip | string | the string to check |


**Returns:**

void

Nothing. It either passes or throws.

## Exceptions

TypeError `'Given network address "<ip>" is invalid!'` — including for a valid IPv6 address.

