Before sample code would be presented, it would be best to understand what you’re trying to do.
How are you currently posting 2 records into 2 tables at the same time? Wouldn’t Navigations be posted first? Otherwise how could you get the value for navigation_id in the NavigationsTexts table?
Would it be more correct to assume the Navigations record already exists, and its the validation of the navigation_id field in the NavigationsTexts table which requires the validation?
Please explain the situation more clearly, what does at the same time means to you.
A new autoincrement ID is created above, in the second table, the new id is copied to navigation_id.
Validation is performed during patchentity and here I would need to verify that the same string no longer exists in the slug column if site_id = 1 is in table 1.
If I enter the same URL with site_id = 1, it will throw me an error, because the record already exists. If I choose site_id = 2, the record can be saved.