
export function noEmpty (_, value, callback) {

  if (Array.isArray(value)) {
    value.length > 0 ? callback() : callback(false)
    return
  }

  const ptn1 = /[^\w_\+\u4e00-\u9fa5]+/g
  const ptn2 = /(^\s*)|(\s*$)/g
  if (ptn1.test(value) || (value || '').replace(ptn2, '').length === 0) {
    callback(false)
  } else {
    callback()
  }
}