Yii Framework Forum: Error With 'unique' Validator Rule - Yii Framework Forum

Jump to content

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

Error With 'unique' Validator Rule Property "RegisterForm.isNewRecord" is not defined. Rate Topic: -----

#1 User is offline   KMBaczynski 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 10-March 10

Posted 11 March 2010 - 02:45 AM

My validator rules look like so:
	public function rules()
	{
		return array(
			array('username, password, passwordAgain, email, zip, lookingFor, gender, interestedIn', 'required'),
			array('username, email', 'unique', 'className'=>'User'),
			array('password', 'length', 'min'=>'6', 'max'=>'16'),
			array('username', 'length', 'min'=>'5', 'max'=>'24'),
			array('verifyCode', 'captcha'),
			array('password', 'compare', 'compareAttribute'=>'passwordAgain'),
			array('email','email'),
		);
	}

My problem is:
Property "RegisterForm.isNewRecord" is not defined.

The 'exist' rule works just fine, as do others. Am I doing something wrong with this rule?
0

#2 User is offline   KMBaczynski 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 10-March 10

Posted 15 March 2010 - 10:33 AM

Bump for ideas? I'm clueless here, still haven't gotten it to work after 4 days.

Aha, saw this in the new changelog:
Bug #816: CUniqueValidator did not work with CFormModel

Guess I'll upgrade when I get home. :)

This post has been edited by KMBaczynski: 15 March 2010 - 10:38 AM

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