# validatorjs/validator.js

String validation

Repository: https://github.com/validatorjs/validator.js
Canonical: https://ross.abutalabs.com/products/validatorjs
Language: JavaScript
License: MIT
License Family: permissive
Topics: validation, sanitization, javascript, node, input, validator, validations, validate, sanitize, hacktoberfest
Last push: 2026-08-15T19:20:16+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 65, longevity 100
- inputs: {"age_days": 5810, "days_push": 18, "days_rel": 153, "gap_med": 50.5, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 23737, forks 2495 (observed 2026-08-28T04:11:35.308337+00:00)

## What it is
A JavaScript library of string validators and sanitizers for Node.js and browsers. It provides dozens of checks like isEmail, isURL, and isDate, plus sanitization helpers for cleaning user input.

## Use cases
- validate email addresses in a node.js api
- sanitize user input before storing in a database
- check if a string is a valid url or ip address
- validate form fields in the browser
- validate dates, phone numbers, and credit cards
- clean and normalize strings from untrusted sources

## When to choose
- you need battle-tested string validation in JavaScript or TypeScript
- you want a lightweight, dependency-free validator usable on server and client
- you need tree-shakeable imports of individual validators

## When to avoid
- you need to validate non-string values like objects or arrays
- you want schema-based validation with type coercion (use zod or joi)
- you need form state management, not just validation

## Facets
- artifact type: library
- maturity: stable
- function: form-handling, security, developer-tools
- domain: web-development, backend, frontend, developer-tools
- platform: browser
- tags: string-validation, sanitization, input-validation, email-validation, form-validation, nodejs, javascript

## Member repositories
- validatorjs/validator.js (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:35.308337+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:56:21.477323+00:00, confidence not recorded.
  - readme: https://github.com/validatorjs/validator.js (fetched 2026-08-28T04:11:35.308337+00:00, sha 12c4c7099242)
- Data as of 2026-08-30T08:39:29.467469+00:00.
