Using spatie/laravel-tags plugin (https://docs.spatie.be/laravel-tags/v2/basic-usage/using-tags) in my Laravel 5.7 app I make editor of tags, so that admin would be able to add tags , but I need to make validation on tags uniqueness.
but usual validation rules like
'name' => [
'required',
'string',
'max:255',
Rule::unique(with(new Tag)->getTableName())->ignore($tag_id),
],
'order_column' => 'nullable|integer',
does not work here, as fields are in json format like
{"en": "Drama"}
Could you, please, give a hint in which way this validation can be done?
Thanks!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire