Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
92caabe5
authored
Nov 30, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
更新用户必填
parent
5691d711
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
app/Http/Requests/UserUpdate.php
app/Http/Requests/UserUpdate.php
View file @
92caabe5
...
...
@@ -2,6 +2,7 @@
namespace
App\Http\Requests
;
use
App\Models\UserModel
;
use
Illuminate\Foundation\Http\FormRequest
;
class
UserUpdate
extends
BaseRequest
...
...
@@ -23,11 +24,15 @@ class UserUpdate extends BaseRequest
*/
public
function
rules
()
{
return
[
$rule
=
[
'account_properties'
=>
'required|in:1,2'
,
'company_name'
=>
'required|max:50'
,
'first_name'
=>
'required|max:50'
,
'last_name'
=>
'required|max:50'
,
];
if
(
request
()
->
input
(
'account_properties'
)
==
UserModel
::
ACCOUNT_PROPERTIES_COMPANY
)
{
$rule
[
'company_name'
]
=
'required|max:50'
;
}
return
$rule
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment