Open elstamey opened 10 years ago
The update form should be it's own class with it's own set of rules.
if you need to pass the id to check for uniqueness, in your update form class overwrite the
public function getValidationRules();
or add another function that will prepare the $rules (by replacing a string in your rules with the actual id value) and return $this and chain that to the form before calling the validate() method.
You should look at https://github.com/laracasts/Validation/issues/6
In the laracasts demonstration, there was never any situation that used the validators to update, and I could really use some help with validating uniqueness except on update. Could you provide an example in the README or add a Laracast link to something that will help me fix the mess I've created?