It's in the docs. http://laravel.com/docs/master/validation#rule-unique
look for Forcing A Unique Rule To Ignore A Given ID. that is the answer you are looking for
I want to ignore it only if it is the same value as the input field on the form. If the value is different, I want to validate it for a unique value.
e.g. User Settings form contains username, email and password fields. The user has the option to change their username and email, as well as password. If the input data for the username and email is the same as the data in the db, No update is necessary. If they are different, then apply the unique validation rules.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community