How do I write custom model validators for my plugin that refer to other fields?
Looks like I can just refer to the other field name: 

public function validateUsername($attribute)
{
    $value = $this-&gt;$attribute;
    $otherFieldsValue = $this-&gt;otherField;

    if ($value &amp;&amp; strtolower($otherFieldsValue) == 'spartacus') {
        $message = Craft::t("No, I'm Spartcus!");
        $this-&gt;addError($attribute, $message);
    }
}