Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Laravel 9 Unique Validation on Update

 // Using Form Request

 	public function rules()
    {
        return [
            'name'  => [
                'required',
                Rule::unique('posts')->ignore($this->id)
            ],
          ];
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Laravel #Unique #Validation #Update
ADD COMMENT
Topic
Name
7+8 =