Live tests

Run the library, right here.

A battery of cases across every rule type, run against the real Go backend. This is the same behaviour the package's Go test suite verifies, executed live in your browser.

35 cases against the live backendnot run

Strings 8

email accepts a valid addressvalidateopen ↗
email rejects a bad addressvalidateopen ↗
minLength rejects short inputvalidateopen ↗
chained rules accept a strong passwordvalidateopen ↗
inOptions rejects an outside valuevalidateopen ↗
matchRegex accepts a slugvalidateopen ↗
noSpecialChars rejects punctuationvalidateopen ↗
isUUID accepts a UUIDvalidateopen ↗

Numbers 4

between accepts an in-range valuevalidateopen ↗
between rejects an out-of-range valuevalidateopen ↗
positive rejects a negative numbervalidateopen ↗
isInteger rejects a floatvalidateopen ↗

Dates 3

isDate accepts an ISO datevalidateopen ↗
before accepts an earlier datevalidateopen ↗
after rejects an earlier datevalidateopen ↗

Arrays 3

minItems rejects a short arrayvalidateopen ↗
unique rejects duplicatesvalidateopen ↗
itemsInOptions accepts allowed itemsvalidateopen ↗

Operators 8

trim then capitalizeoperateopen ↗
upper-cases a stringoperateopen ↗
multiply then roundoperateopen ↗
default fills an empty valueoperateopen ↗
lower-cases a stringoperateopen ↗
subtract from a numberoperateopen ↗
toString converts a numberoperateopen ↗
arrayToObject keys by a fieldoperateopen ↗

Conditions 2

when-gate runs the rule (condition true)validateopen ↗
when-gate skips the rule (condition false)validateopen ↗

Engine 5

required reports a missing fieldvalidateopen ↗
wildcard target validates each array elementvalidateopen ↗
array errors carry the row idvalidateopen ↗
custom message is usedvalidateopen ↗
unknown rule is caught as a schema errorvalidateopen ↗

Localization 2

renders the Arabic messagevalidateopen ↗
falls back to the default messagevalidateopen ↗