Laravel ignore validation while updating record

杀马特。学长 韩版系。学妹 提交于 2019-12-25 02:25:27

问题


Validation for my model looks like:

public static $rules = array(
    'email' => 'required',
    'password' => 'required'
);

How can i tell laravel not to check the validation for "password" field if user is going to update the record and also i want to retain the previous password in the database until user fills the password again from the edit form?

来源:https://stackoverflow.com/questions/24387300/laravel-ignore-validation-while-updating-record

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!