happypack
Version:
webpack speed booster, makes you happy!
10 lines (8 loc) • 343 B
JavaScript
import memoize from 'lru-memoize';
import {createValidator, required, maxLength, email} from 'utils/validation';
const surveyValidation = createValidator({
name: [required, maxLength(10)],
email: [required, email],
occupation: maxLength(20) // single rules don't have to be in an array
});
export default memoize(10)(surveyValidation);