Yii Framework Forum: Not so clear action in Model / AttributeLabels - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Not so clear action in Model / AttributeLabels Rate Topic: -----

#1 User is offline   sebas 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 496
  • Joined: 28-October 08
  • Location:Buenos Aires, Argentina

Posted 30 October 2008 - 09:36 PM

Hi!

I tried the default Yii application that is created with the console app.

I change the model attributeLabel to something like this:


/**
* Declares attribute labels.
* If not declared here, an attribute would have a label
* the same as its name with the first letter in upper case.
*/
public function attributeLabels()
{
return array(
'verifyCode'=>'Código de verificación',
);
}

public function rules()
{
return array(
array('username, password', 'required',"message"=>'Debe ingresar el {attribute}' ),
array('verifyCode', 'captcha', 'allowEmpty'=>!extension_loaded('gd'), "message"=>'{attribute} inválido'),
array('password', 'authenticate'),
);
}


In the label for the captcha, the label is código de validación , but in the validation text attribute name is: código de validación....

I think, IMHO, that there must be just one and defined action to use these codes.

What do you think?

Greetings from Argentina

Sebas
0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,875
  • Joined: 04-October 08
  • Location:DC, USA

Posted 30 October 2008 - 10:16 PM

Thanks. Fixed.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users