const foo:string = "foo bar baz";
const v = new Validator();
const result = v
.addStep<string>(s => s.length > 5, "length should be greater than 5")
.addStep<string>(s => s.includes("foo"), "should contain 'foo'")
.validate(foo);
const isValid = result.ok;
result.errors.map(console.log);
-
Notifications
You must be signed in to change notification settings - Fork 0
charconstpointer/v
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description or website provided.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published