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
13465be8
Commit
13465be8
authored
Jun 23, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4015 from klevron/temp
Fix typo in input-validation.md guide [skip ci]
parents
ba690d54
b2630575
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
input-validation.md
docs/guide/input-validation.md
+5
-5
No files found.
docs/guide/input-validation.md
View file @
13465be8
...
...
@@ -322,7 +322,7 @@ the method/function is:
* @param string $attribute the attribute currently being validated
* @param array $params the additional name-value pairs given in the rule
*/
function
(
$
model
,
$attribute
)
function
(
$
attribute
,
$params
)
```
If an attribute fails the validation, the method/function should call
[
[yii\base\Model::addError()
]
] to save
...
...
@@ -364,9 +364,9 @@ class MyForm extends Model
> Note: By default, inline validators will not be applied if their associated attributes receive empty inputs
or if they have already failed some validation rules. If you want to make sure a rule is always applied,
you may configure the
[
[yii\
base\Validator::skipOnEmpty|skipOnEmpty
]
] and/or
[
[yii\base
\Validator::skipOnError|skipOnError
]
]
properties to be false in the rule declarations. For example
,
```
php
you may configure the
[
[yii\
validators\Validator::skipOnEmpty|skipOnEmpty
]
] and/or
[
[yii\validators
\Validator::skipOnError|skipOnError
]
]
properties to be false in the rule declarations. For example
:
>
```php
[
[
'country', 'validateCountry', 'skipOnEmpty' => false, 'skipOnError' => false
]
,
]
...
...
@@ -529,7 +529,7 @@ JS;
> Tip: The above code is given mainly to demonstrate how to support client-side validation. In practice,
you may use the [in](tutorial-core-validators.md#in) core validator to achieve the same goal. You may
write the validation rule like the following:
```
php
>
```php
[
['status', 'in', 'range' => Status::find()->select('id')->asArray()->column()],
]
...
...
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