I am trying to validate that the data selected from a select is in the "categories_condominiums" table and in the "category" column since the user could change the html code, I do it with this FormRequest rule:
'categoria_condominio' => 'in:categorias_condominios,categoria|required',
And this is the table where it does the condo_categories check:
But whichever one I choose, it gives me the error:
Mistake! The selected condo category is invalid.
The exists function checks if an element is in a field of the indicated table, replace it
in
withexists