Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

✅ Fast and small validation framework based on schemas, inspired by Laravel

License

Notifications You must be signed in to change notification settings

ubermanu/max-validator

 
 

Repository files navigation

Max Validator

Fast and small validation framework based on schemas, inspired by Laravel.

Install

You can install max-validator using any package manager:

npm i @shrtns/max-validator

Quick Start

import { validate } from 'https://cdn.skypack.dev/@shrnts/max-validator'

const user = {
    firstname: 'John',
    lastname: 'Doe',
    age: 20,
}

const schema = {
    firstname: 'required|string|min:3',
    lastname: 'required|string|min:3',
    age: 'number',
}

const validation = validate(user, schema)
console.log(validation.passed()) // true

You can check out the docs for more information.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

✅ Fast and small validation framework based on schemas, inspired by Laravel

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • TypeScript 98.7%
  • JavaScript 1.3%