public function buildRules(RulesChecker $rules)
    {
        //Uses validation rules as application rules
        $rules->add(function (Token $entity) {
            $errors = $this->getValidator('default')->errors(
                $entity->extract($this->getSchema()->columns(), true),
                $entity->isNew()
            );
            $entity->setErrors($errors);

            return empty($errors);
        });

        $rules->add($rules->existsIn(['user_id'], 'Users'));

        return $rules;
    }