{"action":"created","issue":{"url":"https://api.github.com/repos/getkirby/toolkit/issues/197","repository_url":"https://api.github.com/repos/getkirby/toolkit","labels_url":"https://api.github.com/repos/getkirby/toolkit/issues/197/labels{/name}","comments_url":"https://api.github.com/repos/getkirby/toolkit/issues/197/comments","events_url":"https://api.github.com/repos/getkirby/toolkit/issues/197/events","html_url":"https://github.com/getkirby/toolkit/issues/197","id":185800105,"number":197,"title":"PHP Error","user":{"login":"bigflannel","id":677521,"avatar_url":"https://avatars.githubusercontent.com/u/677521?v=3","gravatar_id":"","url":"https://api.github.com/users/bigflannel","html_url":"https://github.com/bigflannel","followers_url":"https://api.github.com/users/bigflannel/followers","following_url":"https://api.github.com/users/bigflannel/following{/other_user}","gists_url":"https://api.github.com/users/bigflannel/gists{/gist_id}","starred_url":"https://api.github.com/users/bigflannel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigflannel/subscriptions","organizations_url":"https://api.github.com/users/bigflannel/orgs","repos_url":"https://api.github.com/users/bigflannel/repos","events_url":"https://api.github.com/users/bigflannel/events{/privacy}","received_events_url":"https://api.github.com/users/bigflannel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-27T22:53:29Z","updated_at":"2016-10-28T15:34:47Z","closed_at":"2016-10-28T15:34:47Z","body":"I am trying to use invalid(). I have been working from:\r\n\r\nhttps://gist.github.com/bastianallgeier/c396df7923848912393d\r\n\r\nI have set up a contact form and it works if I don't validate the data. My data validation code is:\r\n\r\n`$data = array (\r\n\t\t'name'  => get( 'name' ),\r\n\t\t'email' => get( 'email' ),\r\n\t\t'text'  => get( 'text' ),\r\n\t);\r\n\t$rules = array(\r\n\t\t'name'  => array( 'required ' ),\r\n\t\t'email' => array( 'required ', 'email' ),\r\n\t\t'text'  => array( 'required ' ),\r\n\t);\t\r\n\t$messages = array(\r\n\t\t'name'  => 'Please enter your name',\r\n\t\t'email' => 'Please enter a valid email address',\r\n\t\t'text'  => 'Please enter your inquiry',\r\n\t);\r\n\t// some of the data is invalid\r\n\tif ( $invalid = invalid ( $data, $rules, $messages ) ) {\t\r\n\t\t$alert = $invalid;\t\r\n\t// the data is fine, let's send the email\r\n\t} else {\r\n\t}\r\n}\r\nreturn compact( 'alert' );`\r\n\r\nI get the following in my logs:\r\n\r\nmod_fcgid: stderr: PHP Fatal error: Uncaught exception 'Exception' with message 'The validator does not exist: required ' in kirby/toolkit/lib/v.php:39\r\nmod_fcgid: stderr: Stack trace:, referer: \r\nmod_fcgid: stderr: #0 [internal function]: V::__callStatic('required ', Array) \r\nmod_fcgid: stderr: #1 [internal function]: V::required ('Mike Hartley', 'required ')\r\nmod_fcgid: stderr: #2 kirby/toolkit/helpers.php(270): call_user_func_array(Array, Array) \r\nmod_fcgid: stderr: #3 kirby/toolkit/helpers.php(324): call(Array, Array)\r\nmod_fcgid: stderr: #4 site/controllers/page.php(22): invalid(Array, Array, Array) \r\nmod_fcgid: stderr: #5 [internal function]: Kirby\\\\Registry\\\\Controller->{closure}(Object(Site), Object(Children), Object(Page), Array)\r\nmod_fcgid: stderr: #6 kirby/core/page.php(1416): call_user_func_array(Object(Closure), Array)\r\nmod_fcgid: stderr: #7 kirby/toolkit/lib/v.php on line 39\r\n\r\nAppreciate any advice. I tried updating Toolkit etc.\r\n\r\nRegards\r\nMike\r\n"},"comment":{"url":"https://api.github.com/repos/getkirby/toolkit/issues/comments/256952981","html_url":"https://github.com/getkirby/toolkit/issues/197#issuecomment-256952981","issue_url":"https://api.github.com/repos/getkirby/toolkit/issues/197","id":256952981,"user":{"login":"bigflannel","id":677521,"avatar_url":"https://avatars.githubusercontent.com/u/677521?v=3","gravatar_id":"","url":"https://api.github.com/users/bigflannel","html_url":"https://github.com/bigflannel","followers_url":"https://api.github.com/users/bigflannel/followers","following_url":"https://api.github.com/users/bigflannel/following{/other_user}","gists_url":"https://api.github.com/users/bigflannel/gists{/gist_id}","starred_url":"https://api.github.com/users/bigflannel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigflannel/subscriptions","organizations_url":"https://api.github.com/users/bigflannel/orgs","repos_url":"https://api.github.com/users/bigflannel/repos","events_url":"https://api.github.com/users/bigflannel/events{/privacy}","received_events_url":"https://api.github.com/users/bigflannel/received_events","type":"User","site_admin":false},"created_at":"2016-10-28T15:34:47Z","updated_at":"2016-10-28T15:34:47Z","body":"[insert ashamed face]\r\n\r\nThank you.\r\n\r\nMuch appreciated.\r\n\r\nRegards\r\nMike\r\n"}}
{"actor":{"display_login":"bigflannel"}}