Select field with relationship, does it need validation?
When creating a select field with relationship options do i need to validate that the selected option is actually in the list of available options or does the component check this already?
3 Replies
Solution
I think not
vendor/filament/forms/src/Components/Select.php:930
`php
return Rule::exists(
$relationship->getModel()::class,
$component->getQualifiedRelatedKeyNameForRelationship($relationship),
);
Nice
Thanks!
I forgot to mention that in my case i have to check if the branch belongs to a profile, so i do have to keep the check.