v0.7.0
- Accept Functions as Input (#97) by @AutoSponge
Spected now also accepts a function as input to validate against.
const verify = validate(a => a, a => a)
const validationRules = {
name: nameValidationRule,
}
const input = {name: 'foobarbaz'}
const result = verify(validationRules, key => key ? ({...input, [key]: ''}) : input)
deepEqual({name: ['Name should not be empty.']}, result)
- Internal improvement (#94) by @cloud-walker
- Typo Fixes by (#81) @yickli and (#96) @DavidSunny