Terrance Tang
Terrance Tang

Reputation: 11

Yii error summary default message change

Hi am not very familiar with Yii framework, Can someone show me how to change the default errorSummary message? I've already looked at the Yii guide and confused me. What do I need to add to my model and what I need in the view? Thanks

Upvotes: 0

Views: 4712

Answers (1)

Ninad
Ninad

Reputation: 1871

Write the default message to the rules section of your model as shown below

public function rules()
    {
array('attrubutename', 'required','message' => 'Your message'),
        }

UPDATED try this

<?php echo $form->errorSummary($model,'Your message goes here'); ?>

Upvotes: 5

Related Questions