Question with if block and validation

I am using an if block in the validation section of a text field which goes like-->
if(
isnull(
ri!selectedCaseId
),
{
" The case ID you entered is not valid, Please try again"
},
{}
)
despite the check(condition ) being true, the validation message is still not getting displayed. Attached is the snapshot where i am displaying the output of the if condition and it is true!!!!

OriginalPostID-218233

OriginalPostID-218233

  Discussion posts and replies are publicly visible