> For the complete documentation index, see [llms.txt](https://www.strickland.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.strickland.io/form-validation/emptyresults.md).

# emptyResults

Applications that maintain validation state for interaction generally need to initialize the state with an empty validation result. Strickland's `form` validator provides an `emptyResults()` helper function to simplify that need.

## Usage

```jsx
const personValidator = form({
    firstName: [
        required(),
        length({minLength: 2, maxLength: 20})
    ],
    lastName: [
        required(),
        length({minLength: 2, maxLength: 20})
    ],
    birthYear: range({min: 1900, max: 2018})
});

let validationResult = personValidator.emptyResults();

/*
    validationResult = {
        form: {
            validationResults: {},
            validationErrors: [],
            isComplete: false
        }
    }
 */
```
