travel/admin/plop-templates/utils.js

3 lines
87 B
JavaScript

exports.notEmpty = name => v =>
!v || v.trim() === '' ? `${name} is required` : true