Validation messages appear in the wrong place (Magento 1)

Sometimes Magento validation messages do not appear immediately below the field they refer to. This can happen after a layout redesign, for example. To fix this, add the class field-row to the parent element.