{"action":"opened","issue":{"url":"https://api.github.com/repos/CharlotteDunois/Validator/issues/5","repository_url":"https://api.github.com/repos/CharlotteDunois/Validator","labels_url":"https://api.github.com/repos/CharlotteDunois/Validator/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/CharlotteDunois/Validator/issues/5/comments","events_url":"https://api.github.com/repos/CharlotteDunois/Validator/issues/5/events","html_url":"https://github.com/CharlotteDunois/Validator/issues/5","id":370679872,"node_id":"MDU6SXNzdWUzNzA2Nzk4NzI=","number":5,"title":"Adding a rule makes the defualt rules unable to assign to rulesets","user":{"login":"Animeshz","id":26714676,"node_id":"MDQ6VXNlcjI2NzE0Njc2","avatar_url":"https://avatars2.githubusercontent.com/u/26714676?v=4","gravatar_id":"","url":"https://api.github.com/users/Animeshz","html_url":"https://github.com/Animeshz","followers_url":"https://api.github.com/users/Animeshz/followers","following_url":"https://api.github.com/users/Animeshz/following{/other_user}","gists_url":"https://api.github.com/users/Animeshz/gists{/gist_id}","starred_url":"https://api.github.com/users/Animeshz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Animeshz/subscriptions","organizations_url":"https://api.github.com/users/Animeshz/orgs","repos_url":"https://api.github.com/users/Animeshz/repos","events_url":"https://api.github.com/users/Animeshz/events{/privacy}","received_events_url":"https://api.github.com/users/Animeshz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-16T15:49:53Z","updated_at":"2018-10-16T15:49:53Z","closed_at":null,"author_association":"NONE","body":"**Please describe the issue you are having:**\r\nTo add a rule `\\CharlotteDunois\\Validation\\Validator::addRule($rule);`, we use this as per documentation but if it is executed before the validator is even once instanciated, then the default rules donot assign.\r\n\r\n**If you are encountering any errors, post the full stack trace here:**\r\n```\r\nPHP Fatal error:  Uncaught RuntimeException: Validation Rule \"class\" does not exist in /home/animesh/Sites/TheIFan/vendor/charlottedunois/validator/src/Validator.php:133\r\nStack trace:\r\n#0 /home/animesh/Sites/TheIFan/vendor/charlottedunois/validator/src/Validator.php(89): CharlotteDunois\\Validation\\Validator->startValidation()\r\n#1 /home/animesh/Sites/TheIFan/src/test.php(12): CharlotteDunois\\Validation\\Validator->passes()\r\n#2 {main}\r\n  thrown in /home/animesh/Sites/TheIFan/vendor/charlottedunois/validator/src/Validator.php on line 133\r\n```\r\n\r\n**Please include a Minimal, Complete and Verifiable Example:**\r\n```php\r\n<?php\r\n\r\nrequire __DIR__.'/../vendor/autoload.php';\r\n\r\n$data = ['generator' => new \\Animeshz\\TheIFan\\TheIFan];\r\n\r\n\\CharlotteDunois\\Validation\\Validator::addRule(new Animeshz\\TheIFan\\IFanRule);\r\n$validator = CharlotteDunois\\Validation\\Validator::make($data, [\r\n\t'generator' => 'class:Animeshz\\TheIFan\\TheIFan'\r\n]);\r\n\r\n$validator->passes();\r\n```\r\n**Further details:**\r\n\r\nValidator version: tested on https://github.com/CharlotteDunois/Validator/commit/97904c3284ac37856fb01038dc700d99bc343083\r\n\r\nPHP version: PHP 7.2.10 (cli) (built: Sep 11 2018 07:06:00) ( NTS )\r\n\r\nOperating System: tested on Fedora 28"}}
{"actor":{"display_login":"Animeshz"}}