Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
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
Yeray Santana Hualde
syncEnrollments
Commits
9dbcca0e
Commit
9dbcca0e
authored
Jul 01, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
fe28fbba
0013e5bc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
message.php
system/validation/message.php
+11
-0
validator.php
system/validator.php
+7
-2
No files found.
system/validation/message.php
View file @
9dbcca0e
...
...
@@ -88,6 +88,17 @@ class Message {
*/
private
static
function
get_upload_of_message
(
$rule
)
{
// ---------------------------------------------------------
// Upload_Of rules sometimes set a "presence_of" error.
//
// This occurs when the uploaded file didn't exist and the
// "not_required" method was not called.
// ---------------------------------------------------------
if
(
$rule
->
error
==
'presence_of'
)
{
return
static
::
get_message
(
$rule
);
}
// ---------------------------------------------------------
// Slice "file_" off of the error type.
// ---------------------------------------------------------
...
...
system/validator.php
View file @
9dbcca0e
...
...
@@ -29,10 +29,15 @@ class Validator {
* @param mixed $target
* @return void
*/
public
function
__construct
(
$target
=
array
()
)
public
function
__construct
(
$target
=
null
)
{
$this
->
errors
=
new
Validation\Error_Collector
;
if
(
is_null
(
$target
))
{
$target
=
Input
::
get
();
}
// ---------------------------------------------------------
// If the source is an Eloquent model, use the model's
// attributes as the validation attributes.
...
...
@@ -46,7 +51,7 @@ class Validator {
* @param mixed $target
* @return Validator
*/
public
static
function
make
(
$target
=
array
()
)
public
static
function
make
(
$target
=
null
)
{
return
new
static
(
$target
);
}
...
...
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