error() public method
Generates a tag that contains the first validation error of $attribute.
Note that even if there is no validation error, this method will still return an empty error tag.
See also $errorOptions.
public $this error ( $options = [] ) | ||
---|---|---|
$options | array|false |
The tag options in terms of name-value pairs. It will be merged with $errorOptions. The options will be rendered as the attributes of the resulting tag. The values will be HTML-encoded using yii\helpers\Html::encode(). If this parameter is The following options are specially handled:
If you set a custom |
return | $this |
The field object itself. |
Please login to continue.