Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel 9 unique validation

 // 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
ADD COMMENT
Topic
Name
8+9 =