Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
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
839e74cd
authored
Oct 14, 2024
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改校验规则(银行账号)
parent
aeb5b301
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
app/Http/Validators/ReceiptValidator.php
app/Http/Validators/ReceiptValidator.php
View file @
839e74cd
...
...
@@ -18,7 +18,7 @@ class ReceiptValidator
$rules
=
[
"bank_name"
=>
"required"
,
"bank_adderss"
=>
"required"
,
"account_no"
=>
[
'required'
,
'regex:/^[0-9]+$/'
]
,
"account_no"
=>
'required|alpha_num'
,
//"account_no" => "required|regex:/^[0-9\-]+$/",
"receipt_type"
=>
'required'
,
"certificate"
=>
"required"
,
...
...
@@ -29,23 +29,13 @@ class ReceiptValidator
$rules
[
"account_name"
]
=
'required'
;
$rules
[
"bank_adderss"
]
=
'required'
;
$rules
[
"nation_id"
]
=
'required'
;
$rules
[
'account_no'
]
=
[
'required'
]
;
$rules
[
'account_no'
]
=
'required|alpha_num'
;
//$rules["international_code"] = 'required';
}
$messages
=
$this
->
messages
();
$validator
=
Validator
::
make
(
$receipt
,
$rules
,
$messages
);
$otherErrors
=
[];
if
(
!
SupplierReceiptService
::
checkAccountNo
(
$receipt
[
'account_no'
])
&&
$receipt
[
'receipt_type'
]
==
2
)
{
if
(
$returnAllError
)
{
$otherErrors
[]
=
'银行账号仅支持输入数字、英文字母、符号 - () 、空格'
;
return
$otherErrors
;
}
else
{
return
'银行账号仅支持输入数字、英文字母、符号 - () 、空格'
;
}
}
if
(
$otherErrors
)
{
return
$otherErrors
;
}
...
...
@@ -69,6 +59,7 @@ class ReceiptValidator
'swift_code.required'
=>
'银行国际代码 Swift Code 不能为空'
,
'account_no.required'
=>
'银行账号 不能为空'
,
'account_no.regex'
=>
'国内银行账号仅支持输入数字且中间不能有空格'
,
'account_no.alpha_num'
=>
'国内银行账号都只允许输入英文和数字'
,
'account_name.required'
=>
'账户名称 不能为空'
,
'certificate.required'
=>
'银行信息凭证 不能为空'
,
'account_adderss.required'
=>
'银行地址 不能为空'
,
...
...
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