Skip to content

Commit

Permalink
fix[plop]: set trim => trim() (PanJiaChen#3254)
Browse files Browse the repository at this point in the history
notEmpty
  • Loading branch information
qige2016 authored and Trong. Pham Van - CMC Global DU1.19 committed Jul 22, 2022
1 parent d282b1f commit f464c14
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions plop-templates/utils.js
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f464c14

Please sign in to comment.