---
title: HTMLObjectElement.checkValidity
slug: Web/API/HTMLObjectElement/checkValidity
tags:
  - API
  - HTML DOM
  - HTMLObjectElement
  - Method
  - NeedsExample
  - Reference
  - checkValidity
  - checkValidity()
browser-compat: api.HTMLObjectElement.checkValidity
---
{{APIRef("HTML DOM")}}

The **`checkValidity()`** method of the
{{domxref("HTMLObjectElement")}} interface returns a boolean value that always
is true, because object objects are never candidates for constraint validation.

## Syntax

```js
const valid = HTMLObjectElement.checkValidity();
```

### Parameters

None.

### Return value

`true`

### Exceptions

None.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
