fe-drone-ci/plop-templates/utils.js

10 lines
156 B
JavaScript

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