src/validation/index.js
function validateFields ( fldsMeta, fldsValue ) {
        return reduce(function ( acc, fldMeta, fldID ) {
            var value  = getOrNull( fldsValue, fldID )
              , errors = validateField( fldID, fldMeta, value );
            return t.merge( acc, errors );
        }, {}, fldsMeta );
    }
function validateFields ( fldsMeta, fldsValue ) {
        return reduce(function ( acc, fldMeta, fldID ) {
            var value  = getOrNull( fldsValue, fldID )
              , errors = validateField( fldID, fldMeta, value );
            return t.merge( acc, errors );
        }, {}, fldsMeta );
    }
function validateFields ( fldsMeta , fldsValue ) { return reduce ( function ( acc , fldMeta , fldID ) { var value = getOrNull ( fldsValue , fldID ) , errors = validateField ( fldID , fldMeta , value ) ; return t . merge ( acc , errors ) ; } , { } , fldsMeta ) ; }
Calculates validity of the array of fields.
@param {Object[]} fldsMeta - array of metadata.
@param {Object[]} fldsValue - map with fields value.
@returns {Object} - {
%fieldID%: [ %failed_validators% ],
...
}
Calculates validity of the array of fields .