{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/validatejs/issues/45","repository_url":"https://api.github.com/repos/aurelia/validatejs","labels_url":"https://api.github.com/repos/aurelia/validatejs/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/validatejs/issues/45/comments","events_url":"https://api.github.com/repos/aurelia/validatejs/issues/45/events","html_url":"https://github.com/aurelia/validatejs/issues/45","id":154073458,"number":45,"title":"Problem with Validatejs approach and UI's","user":{"login":"apawsey","id":2234967,"avatar_url":"https://avatars.githubusercontent.com/u/2234967?v=3","gravatar_id":"","url":"https://api.github.com/users/apawsey","html_url":"https://github.com/apawsey","followers_url":"https://api.github.com/users/apawsey/followers","following_url":"https://api.github.com/users/apawsey/following{/other_user}","gists_url":"https://api.github.com/users/apawsey/gists{/gist_id}","starred_url":"https://api.github.com/users/apawsey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apawsey/subscriptions","organizations_url":"https://api.github.com/users/apawsey/orgs","repos_url":"https://api.github.com/users/apawsey/repos","events_url":"https://api.github.com/users/apawsey/events{/privacy}","received_events_url":"https://api.github.com/users/apawsey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2016-05-10T18:21:48Z","updated_at":"2016-05-11T17:22:22Z","closed_at":null,"body":"Unfortunately I think there's a bit of a core issue with the approach of this plugin.  I don't say that to be alarmist or critical, but let me explain.\r\n\r\nFrom what I can see, validatejs was designed to validate objects (taken from the first line of their site...\r\n> Validate.js provides a declarative way of validating javascript objects.\r\n\r\nNow this is great in the sense of validating a viewmodel, say before posting to an api or some other action.  However in a UI environment, the generally accepted UX is to progressively validate the input _after_ the user has had an attempt - ie, we tell them where they make mistakes (everything's green, until they do it wrong, and then it goes red) instead of saying everything's a problem until they fix it (everything's red when they start and only goes green when they get it right)\r\n\r\nThe problem is our UI is tied to our viewmodel, which we are validating in it's entirety as an object.  Therefore our forms start green, until the first time validation is triggered, which in a good form, is the moment the first field 'blurs'.  Then our whole object is validated, and all feedback is presented, resulting in the rest of the form being marked negative.\r\n\r\nAs far as I can see, we would need to do something like exclude properties from validation, until that ui field has experienced an onblur event... and that already sounds pretty messy."},"comment":{"url":"https://api.github.com/repos/aurelia/validatejs/issues/comments/218528941","html_url":"https://github.com/aurelia/validatejs/issues/45#issuecomment-218528941","issue_url":"https://api.github.com/repos/aurelia/validatejs/issues/45","id":218528941,"user":{"login":"EisenbergEffect","id":131485,"avatar_url":"https://avatars.githubusercontent.com/u/131485?v=3","gravatar_id":"","url":"https://api.github.com/users/EisenbergEffect","html_url":"https://github.com/EisenbergEffect","followers_url":"https://api.github.com/users/EisenbergEffect/followers","following_url":"https://api.github.com/users/EisenbergEffect/following{/other_user}","gists_url":"https://api.github.com/users/EisenbergEffect/gists{/gist_id}","starred_url":"https://api.github.com/users/EisenbergEffect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EisenbergEffect/subscriptions","organizations_url":"https://api.github.com/users/EisenbergEffect/orgs","repos_url":"https://api.github.com/users/EisenbergEffect/repos","events_url":"https://api.github.com/users/EisenbergEffect/events{/privacy}","received_events_url":"https://api.github.com/users/EisenbergEffect/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T17:22:22Z","updated_at":"2016-05-11T17:22:22Z","body":"My main concern is that we can support having a set of validation rules, binding a model for validation and showing the errors only as each field is edited. The thing we don't want is to have three fields, and as soon as you type something in the first field, you get errors on all three. "}}