add some validation to user model

Signed-off-by: Jay Shao <shaoshijie830413@foxmail.com>