---
title: isValid
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/port/isvalid
---

# isValid

A Boolean value that indicates whether the receiver is valid.

## Declaration

```swift
var isValid: Bool { get }
```

## Discussion

Discussion false if the receiver is known to be invalid, otherwise true. An NSPort object becomes invalid when its underlying communication resource, which is operating system dependent, is closed or damaged.

## See Also

### Validation

- [invalidate()](foundation/port/invalidate().md)
