utils.js 154 B

123456789
  1. exports.notEmpty = name => {
  2. return v => {
  3. if (!v || v.trim === '') {
  4. return `${name} is required`
  5. } else {
  6. return true
  7. }
  8. }
  9. }