用网页注册为例,在写代码的过程中发现: 1.接收的某些值不存在于模型类的属性中,需要额外定义。如确定密码,短信验证码等 2.验证方法需要自己写。 3.创建方法默认是将接收的值赋给属性,但是某些值不对应着属性,如密码需要加密后再赋值。