base\Model $errors

$errors public read-only property

Errors for all attributes or the specified attribute. Empty array is returned if no error. Note that when returning errors for all attributes, the result is a two-dimensional array, like the following:

[
    'username' => [
        'Username is required.',
        'Username must contain only word characters.',
    ],
    'email' => [
        'Email address is invalid.',
    ]
]
public array getErrors ( $attribute = null )
doc_Yii
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.