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
1d622b65
Commit
1d622b65
authored
Aug 28, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed docs about error methods in Model
parent
c582e589
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
Model.php
framework/yii/base/Model.php
+7
-3
No files found.
framework/yii/base/Model.php
View file @
1d622b65
...
@@ -244,8 +244,8 @@ class Model extends Component implements IteratorAggregate, ArrayAccess
...
@@ -244,8 +244,8 @@ class Model extends Component implements IteratorAggregate, ArrayAccess
* after the actual validation, respectively. If [[beforeValidate()]] returns false,
* after the actual validation, respectively. If [[beforeValidate()]] returns false,
* the validation will be cancelled and [[afterValidate()]] will not be called.
* the validation will be cancelled and [[afterValidate()]] will not be called.
*
*
* Errors found during the validation can be retrieved via [[getErrors()]]
* Errors found during the validation can be retrieved via [[getErrors()]]
,
*
and [[ge
tError()]].
*
[[getFirstErrors()]] and [[getFirs
tError()]].
*
*
* @param array $attributes list of attributes that should be validated.
* @param array $attributes list of attributes that should be validated.
* If this parameter is empty, it means any attribute listed in the applicable
* If this parameter is empty, it means any attribute listed in the applicable
...
@@ -438,7 +438,8 @@ class Model extends Component implements IteratorAggregate, ArrayAccess
...
@@ -438,7 +438,8 @@ class Model extends Component implements IteratorAggregate, ArrayAccess
* )
* )
* ~~~
* ~~~
*
*
* @see getError
* @see getFirstErrors
* @see getFirstError
*/
*/
public
function
getErrors
(
$attribute
=
null
)
public
function
getErrors
(
$attribute
=
null
)
{
{
...
@@ -452,6 +453,8 @@ class Model extends Component implements IteratorAggregate, ArrayAccess
...
@@ -452,6 +453,8 @@ class Model extends Component implements IteratorAggregate, ArrayAccess
/**
/**
* Returns the first error of every attribute in the model.
* Returns the first error of every attribute in the model.
* @return array the first errors. An empty array will be returned if there is no error.
* @return array the first errors. An empty array will be returned if there is no error.
* @see getErrors
* @see getFirstError
*/
*/
public
function
getFirstErrors
()
public
function
getFirstErrors
()
{
{
...
@@ -473,6 +476,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess
...
@@ -473,6 +476,7 @@ class Model extends Component implements IteratorAggregate, ArrayAccess
* @param string $attribute attribute name.
* @param string $attribute attribute name.
* @return string the error message. Null is returned if no error.
* @return string the error message. Null is returned if no error.
* @see getErrors
* @see getErrors
* @see getFirstErrors
*/
*/
public
function
getFirstError
(
$attribute
)
public
function
getFirstError
(
$attribute
)
{
{
...
...
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