conditional validation not null/nil

Trying to validate presence where another field is not null
I found this example, the opposite

class Person < ApplicationRecord

``validates ``:surname``, presence: ``true``, ``if``: ``"name.nil?"

end

How do I change the if: condition to name not nil?

Why have you asked twice? I have responded to the other one.

Colin