Skip to content

2.0.3: update license and fix readme typo in usage section.

Latest
Compare
Choose a tag to compare
@alguerocode alguerocode released this 16 Feb 07:11
· 14 commits to main since this release
import { Volder } from 'volder';

const personSchema = new Volder({
  name:{ type: String, required: true, maxLength: 10, trim: true },
  age: { type: Number, min: 18, sign: 'positive' }
})

const { valid, errors, value } = personSchema.validate({name: "max  ", age: 19}); // we forget adding a validate function.
// { valid: true, errors: {}, value: {name: "max", age: 19}}