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
e843c307
Commit
e843c307
authored
Jul 26, 2014
by
东方孤思子(Paris·QianSen)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typo fix
not sure about L421
parent
b680afc7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
tutorial-core-validators.md
docs/guide/tutorial-core-validators.md
+3
-5
No files found.
docs/guide/tutorial-core-validators.md
View file @
e843c307
...
@@ -393,7 +393,7 @@ This validator checks if the input value is provided and not empty.
...
@@ -393,7 +393,7 @@ This validator checks if the input value is provided and not empty.
if this property is true.
if this property is true.
> Info: How to determine if a value is empty or not is a separate topic covered
> Info: How to determine if a value is empty or not is a separate topic covered
in the
[
Empty Values
](
input-validation.md#
empty-value
s
)
section.
in the
[
Empty Values
](
input-validation.md#
handling-empty-input
s
)
section.
## [[yii\validators\SafeValidator|safe]] <a name="safe"></a>
## [[yii\validators\SafeValidator|safe]] <a name="safe"></a>
...
@@ -418,15 +418,13 @@ a [safe attribute](structure-models.md#safe-attributes).
...
@@ -418,15 +418,13 @@ a [safe attribute](structure-models.md#safe-attributes).
]
]
```
```
This validator checks if the input value
This validator checks if the input value is a valid string with certain length.
Validates that the attribute value is of certain length.
-
`length`
: specifies the length limit of the input string being validated. This can be specified
-
`length`
: specifies the length limit of the input string being validated. This can be specified
in one of the following forms:
in one of the following forms:
*
an integer: the exact length that the string should be of;
*
an integer: the exact length that the string should be of;
*
an array of one element: the minimum length of the input string (e.g.
`[8]`
). This will overwrite
`min`
.
*
an array of one element: the minimum length of the input string (e.g.
`[8]`
). This will overwrite
`min`
.
*
an array of two elements: the minimum and maximum lengths of the input string (e.g.
`[8, 128]`
)
`
.
*
an array of two elements: the minimum and maximum lengths of the input string (e.g.
`[8, 128]`
).
This will overwrite both
`min`
and
`max`
.
This will overwrite both
`min`
and
`max`
.
-
`min`
: the minimum length of the input string. If not set, it means no minimum length limit.
-
`min`
: the minimum length of the input string. If not set, it means no minimum length limit.
-
`max`
: the maximum length of the input string. If not set, it means no maximum length limit.
-
`max`
: the maximum length of the input string. If not set, it means no maximum length limit.
...
...
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