Active Record validation:
new_record?()//用于验证刚新建,但没存入database中的数据 ,返回true或false
persisted?() //和new_record/()正相反,从英文意看出,Returns true if the record is persisted.it's not a new record and it was not destroyed.
create //验证失败仅仅不会执行代码,返回false.
create! //带!号的话,验证失败会弹出