Validation

Strickland's default export is a validate function that accepts a validator function and the value to validate against the validator; it returns the validation result.

import validate from 'strickland';

function letterA(value) {
    return (value === 'A');
}

const result = validate(letterA, 'B');

Last updated