Commit d1e0a545 by Qiang Xue

guide WIP [skip ci]

parent 1ea6e76e
......@@ -35,8 +35,8 @@ Application Structure
* [Applications](structure-applications.md)
* [Application Components](structure-application-components.md)
* [Controllers](structure-controllers.md)
* [Views](structure-views.md)
* [Models](structure-models.md)
* [Views](structure-views.md)
* **TBD** [Filters](structure-filters.md)
* **TBD** [Widgets](structure-widgets.md)
* **TBD** [Modules](structure-modules.md)
......@@ -88,9 +88,9 @@ Getting Data from Users
-----------------------
* [Creating Forms](input-forms.md)
* [Input Validation](input-validation.md)
* **TBD** [Uploading Files](input-file-uploading.md)
* **TBD** [Inputs for Multiple Models](input-multiple-models.md)
* [Validating Input](input-validation.md)
* **TBD** [Uploading Files](input-file-upload.md)
* **TBD** [Getting Data for Multiple Models](input-multiple-models.md)
Displaying Data
......
......@@ -218,7 +218,7 @@ should be displayed to help the user to fix the errors.
You may call [[yii\base\Model::validate()]] to trigger validation. The method will go through every *active rule*
and make sure it is satisfied. If not, an error message will be generated for each failed rule and attribute.
The method returns a boolean value indicating whether all rules are satisfied. If not, you may retrieve the
error messages through the property [[yii\base\Model::errors]]. For example,
error messages through the property [[yii\base\Model::errors]] or [[yii\base\Model::firstErrors]]. For example,
```php
$model = new \app\models\ContactForm;
......
......@@ -10,7 +10,7 @@ namespace yii\base;
use yii\validators\Validator;
/**
* DynamicModel is a model class primarily used to support ad-hoc data validation.
* DynamicModel is a model class primarily used to support ad hoc data validation.
*
* The typical usage of DynamicModel is as follows,
*
......
......@@ -12,7 +12,7 @@ use yii\base\InvalidConfigException;
use yii\helpers\Html;
/**
* CompareValidator compares the specified attribute value with another value and validates if they are equal.
* CompareValidator compares the specified attribute value with another value.
*
* The value being compared with can be another attribute value
* (specified via [[compareAttribute]]) or a constant (specified via
......@@ -47,14 +47,14 @@ class CompareValidator extends Validator
/**
* @var string the operator for comparison. The following operators are supported:
*
* - '==': validates to see if the two values are equal. The comparison is done is non-strict mode.
* - '===': validates to see if the two values are equal. The comparison is done is strict mode.
* - '!=': validates to see if the two values are NOT equal. The comparison is done is non-strict mode.
* - '!==': validates to see if the two values are NOT equal. The comparison is done is strict mode.
* - `>`: validates to see if the value being validated is greater than the value being compared with.
* - `>=`: validates to see if the value being validated is greater than or equal to the value being compared with.
* - `<`: validates to see if the value being validated is less than the value being compared with.
* - `<=`: validates to see if the value being validated is less than or equal to the value being compared with.
* - `==`: check if two values are equal. The comparison is done is non-strict mode.
* - `===`: check if two values are equal. The comparison is done is strict mode.
* - `!=`: check if two values are NOT equal. The comparison is done is non-strict mode.
* - `!==`: check if two values are NOT equal. The comparison is done is strict mode.
* - `>`: check if value being validated is greater than the value being compared with.
* - `>=`: check if value being validated is greater than or equal to the value being compared with.
* - `<`: check if value being validated is less than the value being compared with.
* - `<=`: check if value being validated is less than or equal to the value being compared with.
*/
public $operator = '==';
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment