js-validation Form Validation Library Demos

Download Back To CSSScript.Com

Validate HTML forms on the client side with js-validation, a dependency-free JavaScript library with rules, custom messages, and submit callbacks.

Account Setup

Validate a common registration flow with live input feedback and a guarded submit callback.

requiredemailminlengthmaxlengthequalTonotEqualTo

Profile Rules

Check names, usernames, numeric ranges, patterns, and hex colors in one compact form.

alphaalphanumericnumericrangepatternishexcolor

Network and Schedule

Validate website, IP address, date, ISO date, and time fields.

urlipv4ipv6datedateISOtime

File Limits

Limit file count, each file size, and total upload size.

maxfilesmaxsizemaxsizetotal

Data Attributes and Custom Methods

Use rules from markup, add a custom method, customize error markup, and switch to custom English messages.

data-rule-*addMethodcustom messagesresetForm
No Build Step

This page runs from one HTML file and does not require local Vite, npm, or a build step.

Vanilla JavaScript Ready

The demo uses browser forms, plain JavaScript, built-in rules, custom rules, and submit handlers without a framework.