Commit 0858c8e6 by 杨树贤

新增地址逻辑

parent 6663e02f
Showing with 1 additions and 1 deletions
......@@ -33,7 +33,6 @@ class UserAddressSave extends BaseRequest
'first_name' => 'required|max:50',
'detail_address' => 'required|max:255',
'post_code' => 'required|max:10',
'address_type' => 'required|in:1,2'
];
if (request()->input('address_type') == UserAddressModel::ADDRESS_TYPE_COMPANY) {
......@@ -44,6 +43,7 @@ class UserAddressSave extends BaseRequest
if (!$isRegister) {
$rules['email'] = 'required|email';
$rules['phone'] = 'required|max:20';
$rules['address_type'] = 'required|in:1,2';
}
if (request()->routeIs('user_address.update')) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment