Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
b3f0f7dc
Commit
b3f0f7dc
authored
Jul 19, 2014
by
Tomek Romik
Committed by
Qiang Xue
Jul 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed typo and inconsistent conditionals
parent
d1c2b137
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
yii.validation.js
framework/assets/yii.validation.js
+1
-1
FileValidator.php
framework/validators/FileValidator.php
+2
-2
No files found.
framework/assets/yii.validation.js
View file @
b3f0f7dc
...
...
@@ -98,7 +98,7 @@ yii.validation = (function ($) {
}
if
(
!~
options
.
extensions
.
indexOf
(
ext
)
)
{
pub
.
addMessage
(
messages
,
options
.
wrongExtension
,
file
);
pub
.
addMessage
(
messages
,
options
.
wrongExtension
,
file
.
name
);
}
}
...
...
framework/validators/FileValidator.php
View file @
b3f0f7dc
...
...
@@ -342,14 +342,14 @@ class FileValidator extends Validator
$options
[
'uploadRequired'
]
=
Yii
::
$app
->
getI18n
()
->
format
(
$this
->
uploadRequired
,
[],
Yii
::
$app
->
language
);
}
if
(
is_array
(
$this
->
mimeTypes
)
)
{
if
(
$this
->
mimeTypes
!==
null
)
{
$options
[
'mimeTypes'
]
=
$this
->
mimeTypes
;
$options
[
'wrongMimeType'
]
=
Yii
::
$app
->
getI18n
()
->
format
(
$this
->
wrongMimeType
,
[
'mimeTypes'
=>
join
(
', '
,
$this
->
mimeTypes
)
],
Yii
::
$app
->
language
);
}
if
(
!
empty
(
$this
->
extensions
)
)
{
if
(
$this
->
extensions
!==
null
)
{
$options
[
'extensions'
]
=
$this
->
extensions
;
$options
[
'wrongExtension'
]
=
Yii
::
$app
->
getI18n
()
->
format
(
$this
->
wrongExtension
,
[
'extensions'
=>
join
(
', '
,
$this
->
extensions
)
...
...
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