Rails validating with condition block
You can try something like this (obviously names can be shorter):

if_user_is_a = -&gt;(klass) { { if: -&gt; { user.is_a?(klass) } } }
validates :inn, presence: if_user_is_a[Client], ..., absence: if_user_is_a[Department]


or

if_user_is_a = -&gt;(klass) { { if: -&gt; { user.is_a?(klass) } } }
if_user_is_a_client = if_user_is_a[Client]
...
validates :inn, presence: if_user_is_a_client, ...