Description
Vest is a validations library for JS apps that derives its syntax from modern JS frameworks such as Mocha or Jest. It is easy to learn due to its use of already common declarative patterns.
It works great with user-input validation and with validating upon user interaction to provide the best possible user experience.
The idea behind Vest is that your validations can be described as a 'spec' or a contract that reflects your form or feature structure. Your validations run in production, and they are framework agnostic - meaning Vest works well with React, Angular, Vue, or even without a framework at all.
Vest alternatives and similar libraries
Based on the "Utilities" category.
Alternatively, view Vest alternatives based on common mentions on social networks and blogs.
-
react-intl
The monorepo home to all of the FormatJS related libraries, most notably react-intl. -
react-i18next
Internationalization for react done right. Using the i18next i18n ecosystem. -
react-on-rails
Integration of React + Webpack + Rails + rails/webpacker including server-side rendering of React, enabling a better developer experience and faster client performance. -
js-lingui
π π A readable, automated, and optimized (3 kb) internationalization for JavaScript -
reactfire
Hooks, Context Providers, and Components that make it easy to interact with Firebase. -
react-three-renderer
Render into a three.js canvas using React. -
react-unity-webgl
React Unity WebGL provides a modern solution for embedding Unity WebGL builds in your React Application while providing advanced APIs for two way communication and interaction between Unity and React. -
react-intl-universal
Internationalize React apps. Not only for Component but also for Vanilla JS. -
react-stripe-checkout
Load stripe's checkout.js as a react component. Easiest way to use checkout with React. -
backbone-react-component
A bit of nifty glue that automatically plugs your Backbone models and collections into your React components, on the browser and server -
reactive-elements
Allows to use React.js component as HTML element (web component) -
react-fetching-library
Simple and powerful API client for react π Use hooks or FACCs to fetch data in easy way. No dependencies! Just react under the hood. -
react-google-autocomplete
React components for google places API. -
<qr-code>
A no-framework, no-dependencies, customizable, animate-able, SVG-based <qr-code> HTML element. -
react-translate-component
A component for React that utilizes the Counterpart module to provide multi-lingual/localized text content. -
react-localstorage
Simple componentized localstorage implementation for Facebook's React. -
gl-react
OpenGL / WebGL bindings for React to implement complex effects over images and content, in the descriptive VDOM paradigm. -
react-children-utilities
Extended utils for βοΈ React.Children data structure that adds recursive filter, map and more methods to iterate nested children. -
gl-react-dom
WebGL bindings for React to implement complex effects over images and content, in the descriptive VDOM paradigm -
react-globalize
Bringing the i18n functionality of Globalize, backed by CLDR, to React -
elm-react-component
A React component which wraps an Elm module to be used in a React application. -
react-middle-ellipsis
Truncate a long string in the middle, instead of the end. -
react-screen-wake-lock
π React implementation of the Screen Wake Lock API. It provides a way to prevent devices from dimming or locking the screen when an application needs to keep running -
react-translate-maker
Universal internationalization (i18n) open source library for React -
Redux Slim Async
:alien: A Redux middleware to ease the pain of tracking the status of an async action -
react-slack-notification
React Slack Notification is a lightweight package, Send messages to a Slack channel directly from your react app. -
react-localized
Internationalization for React and Preact components based on gettext format
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Vest or a related project?
README
Vest - Declarative validations framework
Vest is a form-validation framework inspired by unit testing libraries like Mocha or Jest; It is designed to be easy to use and easy to learn by introducing their declarative syntax.
The idea behind Vest is that your validations can be described as a suite - a contract that reflects your form or feature structure. Vest is framework agnostic, meaning it can be used with any UI framework, or without any framework at all.
Using Vest for form validation can reduce bloat, improve feature readability and maintainability.
test('username', 'Username is required', () => {
enforce(data.username).isNotBlank();
});
test('username', 'Username must be at least 3 chars', () => {
enforce(data.username).longerThanOrEquals(3);
});
test('username', 'Username already taken', async () => {
await doesUserExist(data.username);
});
Installation
npm i vest
Motivation
Writing forms is an integral part of building web apps, and even though it may seem trivial at first - as your feature grows over time, so does your validation logic grows in complexity.
Vest tries to remediate this by separating validation logic from feature logic, so it's easier to maintain over time and refactor when needed.
Why Vest?
π‘ Vest is easy to Learn. Vest adopts the syntax and style of unit testing frameworks, so you can leverage the knowledge you already have to write your form validations.
π¨ Vest is framework agnostic. You can use Vest with any UI framework out there.
π§ Vest takes care of all the annoying parts for you. It manages its validation state, handles async validations, and much more.
π§© Vest is extendable. You can easily add new kinds of validations to Vest according to your needs.
β»οΈ Validation logic in Vest can be shared across multiple features in your app.
Getting Started
Here are some code sandboxes to get you started:
Contribute
Information describing how to contribute can be found here: