Coder Social home page Coder Social logo

vahvista's People

Contributors

6xgate avatar

Watchers

 avatar

vahvista's Issues

Structured validation framework

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";

Validation messages and assertive validation

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);

Remove lodash dependency

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.

  1. Vahvista was original designed for use in Vue.js property validators which already perform many of the same checks when using the type property as certain lodash functions do.
  2. The rules like notEmpty or lowerCase are meant to be used after the type is already confirmed to be a string, per point 1.
  3. These rules will likely be re-used in a future structured validation framework that will be added to vahvista modeled after ow, which will require any necessary type checks to be performed by other rules before any given rule is used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.