UNPKG

node-input-validator

Version:

validation library for nodejs, inspired by laravel.

16 lines (11 loc) 267 B
module.exports = ({ value, args }, v) => { if (!args.length) { throw new Error('Invalid number of arguments'); } const [otherInput] = args; const otherValue = v.inputs[otherInput]; if (otherValue === value) { return false; } return true; };