Browse Source

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

notEmpty
pull/3218/merge
qige2016 5 years ago committed by GitHub
parent
commit
6d88db5c73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      plop-templates/utils.js

11
plop-templates/utils.js

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

Loading…
Cancel
Save