---
title: AnswerCountValidator
product: Form Library
api-type: class
description: A class that implements answer count validation in the question types that can have multiple values (for instance, Checkboxes).
source: https://surveyjs.io/form-library/documentation/api-reference/answercountvalidator
---

# `AnswerCountValidator`

A class that implements answer count validation in the question types that can have multiple values (for instance, [Checkboxes](https://surveyjs.io/form-library/documentation/api-reference/checkbox-question-model)).

[View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))

## Inheritance

[`Base`](https://surveyjs.io/form-library/documentation/api-reference/base.md) &rarr; [`SurveyValidator`](https://surveyjs.io/form-library/documentation/api-reference/surveyvalidator.md) &rarr; `AnswerCountValidator`

## Properties

### `maxCount`

**Type**: `number`

A maximum number of selected answers.

[View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))

### `minCount`

**Type**: `number`

A minimum number of selected answers.

[View Demo](https://surveyjs.io/form-library/examples/javascript-form-validation/ (linkStyle))
