Here are the 3 validation rule that are applied for "initials" field:
'initials' => array(
'Not empty' => array(
'rule' => 'notEmpty',
'message'=>'Please enter a customer\'s initials'
),
'Unique' => array(
'rule' => array('isUniqueForCompany'),
'message' => 'Customer with these initials already exists'
),
'Long' => array(
'rule' => array('between', 2, 12),
'message' => 'Initials should be between 2 and 12 characters long'
)
)
When creating a new record, all 3 rules are applied, but when updating/editting the 'Unique' rule is skipped out.
What can cause such a problem? If needed, I can provide the controller actions ar view forms.