6xgate / vahvista Goto Github PK
View Code? Open in Web Editor NEWSimple composable validation framework
License: MIT License
Simple composable validation framework
License: MIT License
In addition to the currently implemented simple chainable validation framework, a more structured version modeled after ow is desired. This will allow more use-cases with vahvista such as function argument and object schema validation.
This will require exposing the two frameworks as different namespaces in a breaking change:
import { simple: v } from "vahvista";
or
import { structured: v } from "vahvista";
v.dict(v.shape)
should result in Predicate<{ [key: string]: string }>
, but do not
Add support for registering failure messages with rules. This will be used to support added assertive validation functionality, throwing an error if validation fails. v.assert({ value }, v.string.notEmpty);
Lodash currently power many rules in vahvista. This helped to make the first release quick, but lodash performs more check than vahvista should per rule. Vahvista simple rules should only check the basic concept its designed for. This is the case for many reasons.
type
property as certain lodash functions do.notEmpty
or lowerCase
are meant to be used after the type is already confirmed to be a string, per point 1.Some that will result in
PredicateType = Predicate<infer T> ==> T
To better utilize these predicates, have them resolve to literal types
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.