Forcing ignore validation

Posted 2 years ago by lifesound

hi all , thx for your help ..

I have this validation

    public function update(Request $request, $id)
        $this->validate($request, [
            'store_code' => 'numeric|unique:locations,store_code',
            'name' => 'min:2|max:200|unique:locations,name',
            'address' => 'max:700',
            'longitude' => 'numeric',
            'latitude' => 'numeric',
            'city' => 'required|min:2|max:255',

Thats for update Location model

I want to ignore store_code and name from unique rule if it was the same

Please sign in or create an account to participate in this conversation.