function constrainAll(constraint) {
    return ({values, displayName}) => {
        if (isNil(values) || isEmpty(values)) return null;

        for (let value in values) {
            const fail = constraint({value, displayName});
            if (fail) return fail;
        }

        return null;
    };
}
/**
* Apply a constraint to an array of values, e.g values coming from a tag picker.
*
* @param {function} constraint - the executed constraint function to use on the array of values
* @returns ConstraintCb
*/
Apply a constraint to an array of values, e.g values coming from a tag picker.
Apply a constraint to an array of values e . g values coming from a tag picker .
function constrainAll(constraint) {
    return ({values, displayName}) => {
        if (isNil(values) || isEmpty(values)) return null;
        for (let value in values) {
            const fail = constraint({value, displayName});
            if (fail) return fail;
        }
        return null;
    };
}
function constrainAll ( constraint ) { return ( { values , displayName } ) => { if ( isNil ( values ) || isEmpty ( values ) ) return null ; for ( let value in values ) { const fail = constraint ( { value , displayName } ) ; if ( fail ) return fail ; } return null ; } ; }
Apply a constraint to an array of values, e.g values coming from a tag picker.
Apply a constraint to an array of values e . g values coming from a tag picker .