[Vuejs]-Laravel: Validation unique on update still failing all the time

1👍

Use the ignore constraint to ignore the current model when validating unique

public function rules()
{
    return [
        'name' => ['required', Rule::unique('channels')->ignore($this->route('channel'))],
        'base_color' => 'required',
        'complementary_color' => 'required',
    ];
}

Leave a comment