mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 06:30:49 +00:00
鲜花2.0-文案调整
This commit is contained in:
parent
984132bfff
commit
863f78f73f
@ -52,13 +52,16 @@ class ShopsController extends Controller
|
|||||||
$validator = Validator::make($request->all(), [
|
$validator = Validator::make($request->all(), [
|
||||||
'name' => 'required|string|max:191|unique:shops,name',
|
'name' => 'required|string|max:191|unique:shops,name',
|
||||||
'plat_id' => 'required|integer',
|
'plat_id' => 'required|integer',
|
||||||
'ratio' => 'sometimes|default:*1',
|
'ratio' => 'sometimes',
|
||||||
]);
|
]);
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
$this->setValidatorFailResponse($validator->getMessageBag()->getMessages());
|
$this->setValidatorFailResponse($validator->getMessageBag()->getMessages());
|
||||||
|
|
||||||
return response($this->res, $this->res['httpCode']);
|
return response($this->res, $this->res['httpCode']);
|
||||||
}
|
}
|
||||||
|
if(empty($request->ratio)){
|
||||||
|
$request->ratio = "*1";
|
||||||
|
}
|
||||||
$operator = substr($request->ratio, 0, 1);
|
$operator = substr($request->ratio, 0, 1);
|
||||||
if (!in_array($operator, ['+', '-', '*', '/'])) {
|
if (!in_array($operator, ['+', '-', '*', '/'])) {
|
||||||
$this->res->errorMessage = '运算符号仅允许+,-,*,/';
|
$this->res->errorMessage = '运算符号仅允许+,-,*,/';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user