validates 2 column uniquenesee rails code example Example: laravel unique multiple columns $table->unique(['mytext', 'user_id']);