File: lib/rules/different.js

Recommend this page to a friend!
  Classes of Harcharan Singh   Node Input Validator   lib/rules/different.js   Download  
File: lib/rules/different.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Node Input Validator
Validate submitted input values in Node.js
Author: By
Last change: new rules
Date: 2 years ago
Size: 267 bytes
 

Contents

Class file image Download
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; };