Reputation: 4007
I want to compare and return error message if they are equal.
trying like this but not working
[['HRMS_candidateAlternateEmail'], '!compare', 'compareAttribute' => 'HRMS_candidateEmail'],
what will be write way.
Upvotes: 1
Views: 867
Reputation: 1991
Change !compare
to compare
:
[['HRMS_candidateAlternateEmail'], 'compare', 'compareAttribute' => 'HRMS_candidateEmail', 'operator'=>'!='],
More info here and here. Hope that helps.
Upvotes: 1
Reputation: 4007
I found it just added 'operator'=>'!='
and it works.
[['HRMS_candidateAlternateEmail'], 'compare', 'compareAttribute' => 'HRMS_candidateEmail','operator'=>'!='],
Upvotes: 0