All Projects → lundegaard → validarium

lundegaard / validarium

Licence: MIT license
🛡Agnostic validation library for JavaScript applications.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to validarium

schema-dot-org
Validated structured data for websites
Stars: ✭ 42 (+44.83%)
Mutual labels:  validations
cognito-amplify-custom-auth
A React/Redux web application that implements a custom UI for Cognito Userpool Auth using AWS Amplify
Stars: ✭ 27 (-6.9%)
Mutual labels:  redux-form
MagicForm
The easiest way to make complex forms with validations.
Stars: ✭ 31 (+6.9%)
Mutual labels:  validations
stencil-boilerplate
A Stencil app boilerplate including routing, Redux etc.
Stars: ✭ 51 (+75.86%)
Mutual labels:  redux-form
mern-boilerplate
A Full MERN Stack Boilerplate for Web Apps including a local authentication system. Uses React, Express.js, MongoDB, Redux, Passport.js, Webpack, Testing, and more.
Stars: ✭ 211 (+627.59%)
Mutual labels:  ramda
FilterInputJs
Tiny and Powerful Library for limit an entry (text box,input) as number,string or more...
Stars: ✭ 37 (+27.59%)
Mutual labels:  validations
ramda.py
Python clone of Ramda.js
Stars: ✭ 64 (+120.69%)
Mutual labels:  ramda
rapid-react
A light weight interactive CLI Automation Tool 🛠️ for rapid scaffolding of tailored React apps with Create React App under the hood.
Stars: ✭ 73 (+151.72%)
Mutual labels:  redux-form
react-semantic-redux-form
Semantic-ui-react components integration with Redux form
Stars: ✭ 57 (+96.55%)
Mutual labels:  redux-form
mf-lite
🎉 优雅且实用的基于 webpack module federation 的微前端解决方案 / Elegant and practical micro front-end solution based on webpack module federation.
Stars: ✭ 126 (+334.48%)
Mutual labels:  intl
ramdu
Small utils set built around Ramda
Stars: ✭ 18 (-37.93%)
Mutual labels:  ramda
detect-browser-language
Detect browser language
Stars: ✭ 35 (+20.69%)
Mutual labels:  intl
rocket-pipes
Powerful pipes for TypeScript, that chain Promise and ADT for you 🚌 -> ⛰️ -> 🚠 -> 🏂 -> 🚀
Stars: ✭ 18 (-37.93%)
Mutual labels:  ramda
symfony-intl-fix
Provides the symfony/intl fix for new php version in symfony 2.8
Stars: ✭ 20 (-31.03%)
Mutual labels:  intl
R.apex
Functional utility library for Apex
Stars: ✭ 80 (+175.86%)
Mutual labels:  ramda
Fae
A functional module for Deno inspired from Ramda.
Stars: ✭ 44 (+51.72%)
Mutual labels:  ramda
learn-ramda
🐏 Learn ramda, the interactive way
Stars: ✭ 84 (+189.66%)
Mutual labels:  ramda
react-file-input
⚛️  A file Input, with drag'n'drop and image editor for React
Stars: ✭ 71 (+144.83%)
Mutual labels:  redux-form
docker-php7
A docker image with php 7 and extensions (apc, apcu, intl, mcrypt,...)
Stars: ✭ 16 (-44.83%)
Mutual labels:  intl
swagger-editor-validate
This GitHub Actions validates OpenAPI (OAS) definition file using Swagger Editor.
Stars: ✭ 30 (+3.45%)
Mutual labels:  validations

Validarium

by Lundegaard

🖍️ 🛡 🚀

Validations done right.

Platform-agnostic validation library for JavaScript applications with extra focus on composable validations and message translations. Includes (pretty much) out-of-the-box support for both Redux Form and React Intl.

Create your validation schema based on priciples of functional programming.

Open Validarium in a RunKit sandbox!

See our documentation site.

Github MIT License Travis Downloads Version

import { validate, isRequired, isEmail, hasLengthMax, hasValueMin } from 'validarium';

const validateUserForm = validate({
	email: [isRequired, isEmail, hasLengthMax(200)],
	age: [isRequired, isNumber, hasValueMin(18)],
});

validateUserForm({ email: 'something', age: 16 });
// Returns { email: EmailMessage, age: NumberMessage }
//
// EmailMessage is { id: 'validarium.isEmail', defaultMessage: 'Not a valid email format' }
// NumberMessage is { id: 'validarium.isNumber', defaultMessage: 'Not a number' }

Every validation is optional and null-safe. If you want to test against null, please use the isRequired validation.

Of course, validating field arrays, combining multiple validation schemas, and overriding validation messages with custom ones is supported as well.

Installation

Use either of these commands based on the package manager you prefer.

yarn add validarium
npm i validarium

CDN

It is possible to use validarium to start quickly prototype directly in browser.

We provide two Universal Module Definition (UMD) bundles:

⚠️ Using this approach in production is discouraged though - the client has to download the entire library, regardless of which functions are actually used, affecting performance and bandwidth utilization.

Related projects

  • @redux-tools – Maintaining large Redux applications with ease.
  • react-union – Integrate React apps into various CMSs seamlessly.
  • lundium – Beautiful React component library.

Contributing

We are open to all ideas and suggestions, feel free to open an issue or a pull request!

See the contribution guide for guidelines.

License

All packages are distributed under the MIT license. See the license here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].