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
01e5ffdc
Commit
01e5ffdc
authored
Jun 05, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
guide WIP [skip ci]
parent
25f919c1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
14 additions
and
12 deletions
+14
-12
README.md
docs/guide/README.md
+1
-0
input-forms.md
docs/guide/input-forms.md
+1
-1
input-validation.md
docs/guide/input-validation.md
+0
-0
tutorial-core-validators.md
docs/guide/tutorial-core-validators.md
+0
-0
DefaultValueValidator.php
framework/validators/DefaultValueValidator.php
+6
-5
EmailValidator.php
framework/validators/EmailValidator.php
+2
-2
ExistValidator.php
framework/validators/ExistValidator.php
+0
-1
ImageValidator.php
framework/validators/ImageValidator.php
+3
-3
Validator.php
framework/validators/Validator.php
+1
-0
No files found.
docs/guide/README.md
View file @
01e5ffdc
...
...
@@ -173,6 +173,7 @@ Special Topics
*
[
Advanced Application Template
](
tutorial-advanced-app.md
)
*
[
Building Application from Scratch
](
tutorial-start-from-scratch.md
)
*
[
Console Commands
](
tutorial-console.md
)
*
[
Core Validators
](
tutorial-core-validators.md
)
*
[
Internationalization
](
tutorial-i18n.md
)
*
[
Mailing
](
tutorial-mailing.md
)
*
[
Performance Tuning
](
tutorial-performance-tuning.md
)
...
...
docs/guide/input-forms.md
View file @
01e5ffdc
Working with
f
orms
Working with
F
orms
==================
> Note: This section is under development.
...
...
docs/guide/input-validation.md
View file @
01e5ffdc
This diff is collapsed.
Click to expand it.
docs/guide/tutorial-core-validators.md
0 → 100644
View file @
01e5ffdc
This diff is collapsed.
Click to expand it.
framework/validators/DefaultValueValidator.php
View file @
01e5ffdc
...
...
@@ -19,15 +19,16 @@ namespace yii\validators;
class
DefaultValueValidator
extends
Validator
{
/**
* @var mixed a PHP callable returning the default value or the default value to be set to the specified attributes.
* The function signature must be as follows,
* @var mixed the default value or a PHP callable that returns the default value which will
* be assigned to the attributes being validated if they are empty. The signature of the PHP callable
* should be as follows,
*
*
~~~
* function foo($
object
, $attribute) {
*
```php
* function foo($
model
, $attribute) {
* // compute value
* return $value;
* }
*
~~~
*
```
*/
public
$value
;
/**
...
...
framework/validators/EmailValidator.php
View file @
01e5ffdc
...
...
@@ -37,8 +37,8 @@ class EmailValidator extends Validator
*/
public
$allowName
=
false
;
/**
* @var boolean whether to check whether the emails domain exists and has either an A or MX record.
* Be aware
of the fact
that this check can fail due to temporary DNS problems even if the email address is
* @var boolean whether to check whether the email
'
s domain exists and has either an A or MX record.
* Be aware that this check can fail due to temporary DNS problems even if the email address is
* valid and an email would be deliverable. Defaults to false.
*/
public
$checkDNS
=
false
;
...
...
framework/validators/ExistValidator.php
View file @
01e5ffdc
...
...
@@ -61,7 +61,6 @@ class ExistValidator extends Validator
* is the [[\yii\db\Query|Query]] object that you can modify in the function.
*/
public
$filter
;
/**
* @var boolean whether to allow array type attribute.
*/
...
...
framework/validators/ImageValidator.php
View file @
01e5ffdc
...
...
@@ -52,10 +52,10 @@ class ImageValidator extends FileValidator
*/
public
$maxHeight
;
/**
* @var array|string a list of file
mime
types that are allowed to be uploaded.
* This can be either an array or a string consisting of file
mime
types
* @var array|string a list of file
MIME
types that are allowed to be uploaded.
* This can be either an array or a string consisting of file
MIME
types
* separated by space or comma (e.g. "image/jpeg, image/png").
* Mime type names are case-insensitive. Defaults to null, meaning all
mime
types
* Mime type names are case-insensitive. Defaults to null, meaning all
MIME
types
* are allowed.
* @see wrongMimeType
*/
...
...
framework/validators/Validator.php
View file @
01e5ffdc
...
...
@@ -76,6 +76,7 @@ class Validator extends Component
'trim'
=>
[
'class'
=>
'yii\validators\FilterValidator'
,
'filter'
=>
'trim'
,
'skipOnArray'
=>
true
,
],
'unique'
=>
'yii\validators\UniqueValidator'
,
'url'
=>
'yii\validators\UrlValidator'
,
...
...
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