Yii Framework Forum: Yii-User extension message translation error - Yii Framework Forum

Jump to content

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

Yii-User extension message translation error Rate Topic: -----

#1 User is offline   Chas 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 13-September 11

Posted 15 September 2011 - 09:19 AM

Hi,

The error message of the length validation cannot be translated. For example, when the value is too short, it always uses the default message "{attribute} is too short (minimum is 3 characters)."
Although in the model RegistrationForm.php, it defines the message as below:
array('username', 'length', 'max'=>20, 'min' => 3,'message' => UserModule::t("Incorrect username (length between 3 and 20 characters).")),

I need to add 'tooShort' and 'tooLong' to make it display user-defined message.

Is it a bug or do I miss anything in using the 'message' property of validator?

Thanks
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