'use strict';

exports.__esModule = true;
exports.default = validate;

var _utils = require('./utils');

function validate(value, context) {
  var constraint = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];

  return (0, _utils.isEmpty)(value) || value === context[constraint.value] || constraint.errorMessage || false;
}