validator = (values, validations, messages) => {
  let errorMessages = [];
  _.each(validations, (validationStr, field, list) => {
    const validationArr = validationStr.split('|');
    _.each(validationArr, single => {
      if (!validated(values[field], single)) {
        errorMessages.push(messages[`${field}.${single}`]);
      }
    });
  });
  return errorMessages;
}
Returns error messages if the given values does not pass the provided validations.
@param {Object} values
@param {Object} validations
@param {Object} messages
@return {Array} errorMessages