What information you want to validate? In this example from PO, I will block the transaction the the Project field is NULL or no value.
IF (@object_type = '22' AND @transaction_type IN ('A', 'U'))
BEGIN
SELECT TOP 1
@LineNum = a.LineNum + 1
FROM POR1 a
INNER JOIN OPOR b ON a.DocEntry = b.DocEntry
WHERE (a.Project = '' OR a.Project IS NULL) AND b.DocEntry = @list_of_cols_val_tab_del
IF NOT @LineNum IS NULL
BEGIN
SELECT @error = -22,
@error_message = 'Please define project at line #. '+ @LineNum +'. '
END
END