I am having my validation rules for unique in the update section.
In inserting or adding the unique rule is 'Email' => array('unique:driver_details'),
and it will check for the unique coloumn.
But this fails for the update section. While updating it satisfies the other rules and in the unique of email it is checking itself for the unique coloumn and it fails but seeing its own field.
So, how can i check for the unique except its own value in the database ?
This forces to ignore specific id:
'email' => 'unique:table,email_column_to_check,id_to_ignore'
replace segments table
, email_column_to_check
, id_to_ignore
in above example
You could check it here http://laravel.com/docs/4.2/validation#rule-unique