yiimongodbsoute embeddeddocument validation error

hi

i have an EMongoDocument with name attribute

and it has a location embedded document

the location has name attribute too

like this:

{

name: ‘’,

location: {

name: ''

}

}

i created a form from this

if name and location.name is required too

and location.name is empty but name has value

in error list i see the name is empty too

i think this function adds extra error message to name attribute:

/**


 * @since v1.0.8


 */


public function afterValidate()


{


	if($this->hasEmbeddedDocuments())


		foreach($this->_embedded as $doc)


		{


			if(!$doc->validate())


			{


				$this->addErrors($doc->getErrors());


			}


		}


}

do you think, this is a bug, or i do something wrong?