JeffreyWay / Laravel-Model-Validation

This Laravel package auto-validates a model on save.
https://packagist.org/packages/way/database
275 stars 54 forks source link

restoring soft deleted entries throws validation error when "unique" is used #38

Open manuelro opened 9 years ago

manuelro commented 9 years ago

Restoring records while using unique will validate against the same values, because restore triggers a save event, and hence throw the validation exception. You will either have to unset the rules before restoring or modify the 'unique' rule to take it off.