widgets\ActiveForm errorSummary()

errorSummary() public method

Generates a summary of the validation errors.

If there is no validation error, an empty error summary markup will still be generated, but it will be hidden.

See also $errorSummaryCssClass.

public string errorSummary ( $models, $options = [] )
$models yii\base\Model|yii\base\Model[]

The model(s) associated with this form.

$options array

The tag options in terms of name-value pairs. The following options are specially handled:

  • header: string, the header HTML for the error summary. If not set, a default prompt string will be used.
  • footer: string, the footer HTML for the error summary.

The rest of the options will be rendered as the attributes of the container tag. The values will be HTML-encoded using yii\helpers\Html::encode(). If a value is null, the corresponding attribute will not be rendered.

return string

The generated error summary.

doc_Yii
2016-10-30 17:18:04
Comments
Leave a Comment

Please login to continue.