As you know cakephp 1.2 allow to call custom functions during validation.
var $validate = array( 'alias' => array(
'rule' => array('unique', 'alias'),
'required' => true, 'allowEmpty' => false,
'message' => 'Such alias already exists' ),
);
This is sample when you need to have unique field in whole table.
function unique($data, $name){
$this->recursive = -1;
$found = $this->find(array(“{$this->name}.$name” => $data));
$same = isset($this->id) && $found[$this->name][$this->primaryKey] == $this->id;
return !$found || $found && $same;
}
This example from cakebaker blog.