I use it like this:
$this->validate(new PresenceOf(array('field'=>'name', 'message'=>'客户名称不能为空')));
$this->validate(new Uniqueness(array('field'=>'name', 'message'=>'客户名称不可重复')));
But the message is "name is required" when name is empty.Why? The message is right when name exists. Please help me,thanks!