{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Razor/issues/1668","repository_url":"https://api.github.com/repos/aspnet/Razor","labels_url":"https://api.github.com/repos/aspnet/Razor/issues/1668/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Razor/issues/1668/comments","events_url":"https://api.github.com/repos/aspnet/Razor/issues/1668/events","html_url":"https://github.com/aspnet/Razor/issues/1668","id":254842813,"node_id":"MDU6SXNzdWUyNTQ4NDI4MTM=","number":1668,"title":"Feature Question/Request: Razor Pages free view model property annotations","user":{"login":"guardrex","id":1622880,"node_id":"MDQ6VXNlcjE2MjI4ODA=","avatar_url":"https://avatars1.githubusercontent.com/u/1622880?v=4","gravatar_id":"","url":"https://api.github.com/users/guardrex","html_url":"https://github.com/guardrex","followers_url":"https://api.github.com/users/guardrex/followers","following_url":"https://api.github.com/users/guardrex/following{/other_user}","gists_url":"https://api.github.com/users/guardrex/gists{/gist_id}","starred_url":"https://api.github.com/users/guardrex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardrex/subscriptions","organizations_url":"https://api.github.com/users/guardrex/orgs","repos_url":"https://api.github.com/users/guardrex/repos","events_url":"https://api.github.com/users/guardrex/events{/privacy}","received_events_url":"https://api.github.com/users/guardrex/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-09-02T23:44:57Z","updated_at":"2018-06-13T17:50:51Z","closed_at":"2017-09-05T22:57:56Z","author_association":"NONE","body":"This isn't (probably) a thing, but I tried it because it would be cool if it were an actual feature.\r\n\r\nOf course, old skool annotations work fine with a data-bound *class*.\r\n\r\nFor the free view model that comes with a Razor Page, I wish I could just do this ...\r\n```html\r\n<form method=\"post\" enctype=\"multipart/form-data\">\r\n    <p>\r\n        <input asp-for=\"Query\" type=\"text\">\r\n        <span asp-validation-for=\"Query\"></span>\r\n        <button type=\"submit\">Run Query</button>\r\n    </p>\r\n</form>\r\n```\r\n... with (in the `public class IndexModel : PageModel`) ...\r\n```csharp\r\n[BindProperty, Required, StringLength(50)]\r\npublic string Query { get; set; }\r\n```\r\nIs there an MVC theory that argues against this pattern? ... or is it just not a feature? ... If not, would u consider offering it?\r\n\r\nNote: I couldn't get remote validation to work either on a Razor Pages free view model prop."},"comment":{"url":"https://api.github.com/repos/aspnet/Razor/issues/comments/397027164","html_url":"https://github.com/aspnet/Razor/issues/1668#issuecomment-397027164","issue_url":"https://api.github.com/repos/aspnet/Razor/issues/1668","id":397027164,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzAyNzE2NA==","user":{"login":"RKDMax","id":12748819,"node_id":"MDQ6VXNlcjEyNzQ4ODE5","avatar_url":"https://avatars1.githubusercontent.com/u/12748819?v=4","gravatar_id":"","url":"https://api.github.com/users/RKDMax","html_url":"https://github.com/RKDMax","followers_url":"https://api.github.com/users/RKDMax/followers","following_url":"https://api.github.com/users/RKDMax/following{/other_user}","gists_url":"https://api.github.com/users/RKDMax/gists{/gist_id}","starred_url":"https://api.github.com/users/RKDMax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RKDMax/subscriptions","organizations_url":"https://api.github.com/users/RKDMax/orgs","repos_url":"https://api.github.com/users/RKDMax/repos","events_url":"https://api.github.com/users/RKDMax/events{/privacy}","received_events_url":"https://api.github.com/users/RKDMax/received_events","type":"User","site_admin":false},"created_at":"2018-06-13T17:50:50Z","updated_at":"2018-06-13T17:50:50Z","author_association":"NONE","body":"@pranavkm -- Sorry I'm not seeing it.  You said to refer to #6790 to see that it was added in preview2 -- but I don't see anywhere on preview2...  "}}
{"actor":{"display_login":"RKDMax"}}