// email validation // .test('checkDuplUsername', 'same name exists', function (value) { // return new Promise((resolve, reject) => { // kn.http({ // url: `/v1/api/${value}`, // method: 'head', // }).then(() => { // // exists // resolve(false) // }).catch(() => { // // note exists // resolve(true) // }) // }) // })