11-mes-new/plop-templates/utils.js
2022-11-07 08:45:49 +08:00

10 linhas
154 B
JavaScript

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