var values = new validate.User.check(req.body);
let sha256 = crypto.createHash("sha256")
let newPwd = sha256.update(values.password).digest("hex")
console.log(values)
console.log(values.password)
console.log(newPwd)
values.password = newPwd
console.log(values.password)
Source:
Console print:
I wnat to crypt 'password' field, But Failed