mt-ck-wms-ui/plop-templates/utils.js

10 regels
154 B
JavaScript

2021-09-13 14:56:28 +08:00
exports.notEmpty = name => {
return v => {
if (!v || v.trim === '') {
return `${name} is required`
} else {
return true
}
}
}