10 lines
154 B
JavaScript
Raw Permalink Normal View History

2025-03-17 18:17:29 +08:00
exports.notEmpty = name => {
return v => {
if (!v || v.trim === '') {
return `${name} is required`
} else {
return true
}
}
}