A lightweight, zero-dependency form validation library for vanilla JavaScript. Validate email, number, string, select, checkbox, radio, and file inputs with a consistent API.
Why use validate?
Most form validation libraries are bloated with features you don't need. @andresclua/validate gives you a simple, chainable API for validating form inputs without any dependencies.
What you get
The library provides specialized validators for each form input type:
isEmail() — Email format validation with domain checks and async support
isNumber() — Numeric validation with range, positive/negative, and integer-only options
isString() — String validation with length constraints and pattern matching (regex)
isSelect() — Validate select/dropdown elements for required selection
isCheckbox() — Checkbox validation with minimum selection requirements
isRadio() — Radio button validation ensuring a selection is made
isFile() — File validation with type and size restrictions
Getting started
Start with the installation guide to add validate to your project. Then explore each validator type to learn how to use it with your forms.