UNPKG

@mub22/validity

Version:

Lightweight JavaScript validation library inspired by Laravel's rule syntax. Validate fields and forms easily with built-in rules and error messages.

5 lines (4 loc) 133 B
export default function alpha(value) { const regex = /^[a-zA-Z]+$/; return typeof value === "string" && regex.test(value); }