UNPKG

node-input-validator

Version:

validation library for nodejs, inspired by laravel.

15 lines (11 loc) 232 B
const empty = require('../lib/empty'); module.exports = async function sometimes(field, value) { // @ts-ignore if (!(field in this.inputs)) { return true; } if (empty(value)) { return false; } return true; };