Normalize then validate unique entry in a custom module field
If your model somehow extends Yii's Model (which I think it does because you use Yii validators), you can use the beforeValidate() method to change attribute values before validation:

public function beforeValidate()
{
    // Before validation, normalize the attribute's value with whatever method you create for it
    $this-&gt;attribute = $this-&gt;yourNormalizationMethod($this-&gt;attribute);
}


After that, you can use Yii's UniqueValidator to make sure the attribute's value is unique. The docs show you some of it's possible configs, I'm sure you can make it work!