app/Http/Requests/Member/UpdateContactRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        $additionalContactRules = [
            "email" => [
                "required",
                "email",
                Rule::unique("customers","email")->ignore($this->contact->id),
            ],
        ];
        $contactRules = array_merge(
            ValidationRules::storeContactRules(),
            $additionalContactRules
        );
        return $contactRules;
    }
public function rules ( ) { $ additionalContactRules = [ " email " => [ " required " , " email " , Rule :: unique ( " customers " , " email " ) -> ignore ( $ this -> contact -> id ) , ] , ] ; $ contactRules = array_merge ( ValidationRules :: storeContactRules ( ) , $ additionalContactRules ) ; return $ contactRules ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .