public function validate_unique($value, $input, $args)
    {
        $table  = $args[0];
        $column = $args[1];
        $value  = trim($value);

        $exists = $this->db->prepare("
            SELECT count(*) as count
            FROM {$table}
            WHERE {$column} = :value
        ");

        $exists->execute([
            'value' => $value
        ]);

        return ! (bool) $exists->fetchObject()->count;
    }