here is my code :
public function rules()
{
return [
[['iscompany'], 'boolean'],
[['name', 'lname', 'national_code', 'address', 'father_name', 'bc_place', 'bc_date', 'postal_code'], 'required'],
['national_code', 'validateNationalCode', 'skipOnEmpty' => false, 'skipOnError' => false],
];
}
public function validateNationalCode($attribute)
{
$this->addError($attribute, Yii::t('app', "must be true format"));
}
(for testing pupose ofcourse)
but this rule does not show anything
any advice?