outl1ne / nova-multiselect-field

A Laravel Nova package that adds a multiselect to Nova's arsenal of fields.
MIT License
331 stars 120 forks source link

How to use validation rules on multiselect taggable field? #173

Open scramatte opened 1 year ago

scramatte commented 1 year ago

Hi,

How to use validation rules on multiselect taggable field? I've tried the following without success

Multiselect::make('Blacklist IPs', 'blacklist_ips')
                ->placeHolder('introduce cidr subnet or ip address')
                ->options([
                ])
                ->clearOnSelect()
                ->taggable()
                ->rules([
                    'blacklist_ips.*' => 'ip' 
                ]),

Note that I cast Multiselect values as array.

scramatte commented 6 months ago

Hi,

¿Any update on this ?

Regards