"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.validator = validator;
exports.accept = exports.imgAccept = void 0;
var imgAccept = ['image/jpeg', 'image/png', 'image/jpg'];
exports.imgAccept = imgAccept;
var accept = imgAccept.join(',');
exports.accept = accept;

function validator(_, value) {
  if ((value === null || value === void 0 ? void 0 : value.success) === false) {
    return Promise.reject(value.msg);
  }

  return Promise.resolve(true);
}