{"_id":"@clocklimited/validity-validate-if-property-set","_rev":"14-05138d52154ef145da6a3d73e72b3a20","name":"@clocklimited/validity-validate-if-property-set","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@clocklimited/validity-validate-if-property-set","version":"0.0.1","author":{"name":"Adam Duncan","email":"adam.jd@gmail.com"},"license":"ISC","_id":"@clocklimited/validity-validate-if-property-set@0.0.1","maintainers":[{"name":"steepnicki","email":"steepnicki@gmail.com"},{"name":"wesmoore","email":"wes.moore@clock.co.uk"},{"name":"benparnell","email":"benjaminparnell.94@gmail.com"},{"name":"jack828","email":"jackburgess124@gmail.com"},{"name":"asheboy","email":"ash.summers@gmail.com"},{"name":"microadam","email":"adam.jd@gmail.com"},{"name":"ndumato","email":"tola.ndumari@clock.co.uk"}],"homepage":"https://github.com/clocklimited/validity-validate-if-property-set#readme","bugs":{"url":"https://github.com/clocklimited/validity-validate-if-property-set/issues"},"dist":{"shasum":"63ab59c983a3049ba749460fdeea73c3d4d2f251","tarball":"https://registry.npmjs.org/@clocklimited/validity-validate-if-property-set/-/validity-validate-if-property-set-0.0.1.tgz","fileCount":8,"integrity":"sha512-jKTlMcjJqqFB9nFjwFOOUypxCRLcytlpiVMgaOdXR4ojK9FnJfMDeqwk3rjSVJLXYZivF+U94JnQm6OQ2g1aaw==","signatures":[{"sig":"MEYCIQDIOJaW6KeGcw3YVwuNRMunjBECa7mOhM2RHkX86tPvcAIhAOSGQl4pVZFpHXgMFcvi8738jTx/1C9bQpTGmzkD9fIq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6720,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiSweKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpmaQ//bDH/0A7WWEYS3rR7hBsk+gdhmGXj09ewHxpDA/O42AuGBhDp\r\nau4pxd/1scsEOx2NjIC8v2wYPJTqVCHL6asV+yc6HQ7ZkS/up4ZykSmFN4i+\r\nW149F9+CpyTLN4P6UlZXikNC1kLXMbZSuc1VcMnZgUr2vEdrI7r142o5sp+/\r\nsCDJnKrVZJWNUXaO+OQTArwChw1jbkytZHbhwYtLNX9zsdYUMkWBZ28P5cKU\r\nVffn1ZPR0AtCrFQiEJOZhu0Am+BnzSFggmApHDwqPl6lmr1emV6oWivEe6mY\r\ntRZ/5LCJOSrfPAjF5F8PCfaz/vLwINbmEFbsa7LgH7oddb8iUM5jZIYrYR/l\r\ny0LB2WbpVGrPBjyl0nTLTyS2gTdt67g6RGq47u2B2/Tuvm1HSQbYcEDjzjfx\r\n557aHw4PqdOfRfP6rhcEGVmXg4mcv1dTdydMLdpU+R2OXLi8624SbH/aCcDF\r\nnMRV89JVlkqs0Vw0dYXnaUmnZ5BA2YPC9DbdTKESwuzcYG70CSLHVISgHdOb\r\n9sQ9uNkphycpAblMtMIeWS/PQrFWpUrf6m9UQb6i288Qhv78RZ9SOi/WeG9k\r\nb/4WZlaE7kz+J2niC10fT3eNs6zbbe0U55bHOyYXZUYsWpwX8O+5ivfjIhKK\r\no44zyXGGEx8C6l/sznVK3xY9Fdpa8CkP3iE=\r\n=0GIk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"validator.js","gitHead":"8928c2041c4d4c7605371dc91acc374222e9f48d","scripts":{"lint":"jshint .","test":"istanbul cover ./node_modules/.bin/_mocha test","pretest":"npm run-script lint && npm run-script checkStyle","posttest":"istanbul check-coverage && rm -rf coverage","checkStyle":"jscs .","prepublish":"npm test && npm prune"},"_npmUser":{"name":"wesmoore","email":"wes.moore@clock.co.uk"},"repository":{"url":"git+ssh://git@github.com/clocklimited/validity-validate-if-property-set.git","type":"git"},"_npmVersion":"8.3.1","description":"validate the current property if another property is set","directories":{},"_nodeVersion":"16.14.0","dependencies":{},"publishConfig":{"registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"jscs":"1.3.0","mocha":"^1.18.2","jshint":"^2.5.0","istanbul":"^0.2.7","@clocklimited/validity":"0.0.3"},"_npmOperationalInternal":{"tmp":"tmp/validity-validate-if-property-set_0.0.1_1649084297904_0.7351052691816358","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-04-04T14:58:17.835Z","modified":"2025-05-27T15:31:02.830Z","0.0.1":"2022-04-04T14:58:18.305Z"},"bugs":{"url":"https://github.com/clocklimited/validity-validate-if-property-set/issues"},"author":{"name":"Adam Duncan","email":"adam.jd@gmail.com"},"license":"ISC","homepage":"https://github.com/clocklimited/validity-validate-if-property-set#readme","repository":{"url":"git+ssh://git@github.com/clocklimited/validity-validate-if-property-set.git","type":"git"},"description":"validate the current property if another property is set","maintainers":[{"email":"ash.summers@gmail.com","name":"asheboy"},{"email":"steepnicki@gmail.com","name":"steepnicki"},{"email":"scott.howell@clock.co.uk","name":"scott-clock"},{"email":"clock-release-bot@clock.co.uk","name":"clock-release-bot"},{"email":"supermarioryan@gmail.com","name":"rymate1234"}],"readme":"# validity-validate-if-property-set\n\nValidate the current property if another property is set.\n\nE.g you have a URL property of a schema, which is not a required field.\nYou only want to apply validation to that field if another field has a value.\n\n## Installation\n\n```\nnpm install validity-validate-if-property-set --save\n```\n\n## Usage\n\nBelow is a simple example for usage with schemata and save:\n\n```js\nvar validity = require(\"@clocklimited/validity\"),\n  schemata = require(\"schemata\"),\n  save = require(\"save\"),\n  collection = save(\"author\"),\n  validateIfPropertySet = require(\"@clocklimited/validity-validate-if-property-set\");\n\nvar schema = schemata({\n  useLink: { type: Boolean },\n  url: {\n    type: String,\n    validators: { all: [validateIfPropertySet(\"useLink\", validity.url)] },\n  },\n});\n```\n\n## Credits\n\n[Adam Duncan](https://github.com/microadam/)\n","readmeFilename":"README.md"}