Skip to content

Utilities for validation and other things on the server side for subschema.

Notifications You must be signed in to change notification settings

subschema/subschema-server-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Subschema Server Utils

This project provides validateFactory for easy consumption on the server side. When the server only needs to validate data against a schema it may or may not need to be

Installation

  npm i subschema-server-utils --save
 

Usage:

validateFactory returns a function, takes a schema and a loader. The returned function takes a value or valueManager and returns a promise. If no errors, the promise returns null, other wise an object containing the errors is returned

see tests for more information on usage.

There are two usable files, that provide this. One has all the dependencies built in (the default). The other depends on subschema to use the existing subschema module.

var externals = require('subschema-server-utils/externals')

About

Utilities for validation and other things on the server side for subschema.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published