isomorphic-validation
Version:
Isomorphic javascript form validation library.
13 lines (10 loc) • 368 B
JavaScript
import allInvalid from './all-invalid.js';
import renderEntry from '../helpers/render-entry.js';
const renderAllErrors =
(errorPropName = 'msg', toString = renderEntry('⚠')) =>
(validationResult) =>
allInvalid(validationResult)
.map((entry) => entry.concat(errorPropName))
.map(toString)
.join('');
export { renderAllErrors as default };