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