1.3.0 • Published 2 months ago

@contactable/swv v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Schema-Woven Validation

This is a JavaScript implementation of Schema-Woven Validation (SWV), the next generation of web form validation mechanism.

Installation

npm install @contactable/swv --save

Validating user input based on schema

import { validate } from '@contactable/swv';

// schema: SWV schema object
// formData: FormData object
const result = validate( schema, formData );

for ( const [ field, { error } ] of result ) {
	if ( undefined !== error ) {
		// Add validation error message to the field
	}
}
1.3.0

2 months ago

1.2.0

10 months ago

1.1.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago