join_admin/plop-templates/utils.js
2019-12-03 19:03:25 +01:00

10 lines
154 B
JavaScript

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