# Checking a Form with JavaScript

Let the browser check a form with required, min and type, ask it in code with checkValidity(), add rules of your own with setCustomValidity(), and show each error next to its field where everyone, screen reader users included, can find it.

![Cheat sheet: Checking a Form with JavaScript](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/10/24b76e647dbb403c9b981f7f65e42be6.webp)

- Category: JavaScript
- Level: Journeyman
- Tags: aria-describedby, Client-Side Validation, Constraint validation, html, JavaScript, required, Validity state
- Updated: November 1, 2026

Source: https://www.ask-codey.com/cheat-sheets/javascript-forms-validation-cheat-sheet
