..
This commit is contained in:
@@ -28,7 +28,7 @@ class CampusValidator extends AetherValidator
|
||||
'parent_id.required' => '父级ID不能为空',
|
||||
'level.required' => '层级不能为空',
|
||||
'level.in' => '层级只能是1、2、3',
|
||||
]
|
||||
],
|
||||
],
|
||||
'update' => [
|
||||
'rules' => [
|
||||
@@ -43,7 +43,7 @@ class CampusValidator extends AetherValidator
|
||||
'messages' => [
|
||||
'id.required' => '校区ID不能为空',
|
||||
'level.in' => '层级只能是1、2、3',
|
||||
]
|
||||
],
|
||||
],
|
||||
'query' => [
|
||||
'rules' => [
|
||||
@@ -57,8 +57,8 @@ class CampusValidator extends AetherValidator
|
||||
],
|
||||
'messages' => [
|
||||
'level.in' => '层级只能是1、2、3',
|
||||
]
|
||||
]
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class TeacherValidator extends AetherValidator
|
||||
'age.max' => '年龄不能大于65岁',
|
||||
'gender.in' => '性别只能是1(男)或2(女)',
|
||||
'avatar.url' => '头像必须是有效的URL',
|
||||
]
|
||||
],
|
||||
],
|
||||
'update' => [
|
||||
'rules' => [
|
||||
@@ -47,7 +47,7 @@ class TeacherValidator extends AetherValidator
|
||||
'age.max' => '年龄不能大于65岁',
|
||||
'gender.in' => '性别只能是1(男)或2(女)',
|
||||
'avatar.url' => '头像必须是有效的URL',
|
||||
]
|
||||
],
|
||||
],
|
||||
'query' => [
|
||||
'rules' => [
|
||||
@@ -57,9 +57,9 @@ class TeacherValidator extends AetherValidator
|
||||
'major_subject' => 'nullable|string|max:100',
|
||||
'status' => 'nullable|integer|in:0,1',
|
||||
'page' => 'nullable|integer|min:1',
|
||||
'size' => 'nullable|integer|min:1|max'
|
||||
'size' => 'nullable|integer|min:1|max',
|
||||
],
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user