fix[plop]: set trim => trim() (#3254)

notEmpty
This commit is contained in:
qige2016 2020-06-15 12:00:17 +08:00 committed by GitHub
parent 1c943509f9
commit 6d88db5c73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 9 deletions

View File

@ -1,9 +1,2 @@
exports.notEmpty = name => { exports.notEmpty = name => v =>
return v => { !v || v.trim() === '' ? `${name} is required` : true
if (!v || v.trim === '') {
return `${name} is required`
} else {
return true
}
}
}