Laravel Validation (unique rule) <p>i use a seperate class for validation so it looks like </p> <pre><code>class UserValidation { protected static $id; protected static $rules = [ 'email' =&gt; 'required|email|unique:users,email,{{ self::$id }}', 'password' =&gt; 'required|alpha_dash|min:4', ]; public static function validate($input, $id) { self::$id = $id; return Validator::make($input, self::$rules); } } </code></pre> <p>so imagine a user wants to update only his password ,so he updates it > submit but then he receive the error <code>this email is already taken</code> ,because laravel cant read <code>{{ self::$id }}</code> ,so how do i solve something like that.</p>