{"action":"created","issue":{"url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/934","repository_url":"https://api.github.com/repos/aldeed/meteor-autoform","labels_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/934/labels{/name}","comments_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/934/comments","events_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/934/events","html_url":"https://github.com/aldeed/meteor-autoform/issues/934","id":75181217,"number":934,"title":"Bug: AutoForm.validateField() skips fields","user":{"login":"mariorodriguespt","id":1017581,"avatar_url":"https://avatars.githubusercontent.com/u/1017581?v=3","gravatar_id":"","url":"https://api.github.com/users/mariorodriguespt","html_url":"https://github.com/mariorodriguespt","followers_url":"https://api.github.com/users/mariorodriguespt/followers","following_url":"https://api.github.com/users/mariorodriguespt/following{/other_user}","gists_url":"https://api.github.com/users/mariorodriguespt/gists{/gist_id}","starred_url":"https://api.github.com/users/mariorodriguespt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariorodriguespt/subscriptions","organizations_url":"https://api.github.com/users/mariorodriguespt/orgs","repos_url":"https://api.github.com/users/mariorodriguespt/repos","events_url":"https://api.github.com/users/mariorodriguespt/events{/privacy}","received_events_url":"https://api.github.com/users/mariorodriguespt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aldeed/meteor-autoform/labels/confirmed%20bug","name":"confirmed bug","color":"e11d21"},{"url":"https://api.github.com/repos/aldeed/meteor-autoform/labels/will%20accept%20pull%20request","name":"will accept pull request","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-05-11T11:01:26Z","updated_at":"2016-03-09T05:51:19Z","closed_at":null,"body":"I'm building a wizard and I need validation as I god. I'm using `AutoForm.validateField` to validate only a specific set of fields. On chrome dev tools it works fine because I'm running 1 command at a time, on the code I'm running it inside a loop and that's when I noticed the issue. On my case, the first and last fields got a red visual warning but the remaining fields remained valid.\r\n\r\n    var valid = true;\r\n\r\n    _.each( instance.fields.metadata , function( field ){\r\n        valid = AutoForm.validateField( 'myForm', field , false ) && valid;\r\n    });\r\n\r\n    if( valid ){\r\n        instance.vars.set( 'current-step' , step +1 );\r\n    }\r\n\r\nBut things get even worst: I'm using only select type fields and when I provide a valid value for the first field ( remember that the last one was marked invalid ), all the fields pass the validation and my wizard steps with incomplete data.\r\n\r\nI'm not using plugins, just a regular select, and I'm sure that my schema validation is correct.\r\n\r\nThe only reason why I'm using approach is because `AutoForm.validateForm`on an insert forces to be compliance with all the schema required fields."},"comment":{"url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/comments/194125858","html_url":"https://github.com/aldeed/meteor-autoform/issues/934#issuecomment-194125858","issue_url":"https://api.github.com/repos/aldeed/meteor-autoform/issues/934","id":194125858,"user":{"login":"timmygee","id":1378331,"avatar_url":"https://avatars.githubusercontent.com/u/1378331?v=3","gravatar_id":"","url":"https://api.github.com/users/timmygee","html_url":"https://github.com/timmygee","followers_url":"https://api.github.com/users/timmygee/followers","following_url":"https://api.github.com/users/timmygee/following{/other_user}","gists_url":"https://api.github.com/users/timmygee/gists{/gist_id}","starred_url":"https://api.github.com/users/timmygee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timmygee/subscriptions","organizations_url":"https://api.github.com/users/timmygee/orgs","repos_url":"https://api.github.com/users/timmygee/repos","events_url":"https://api.github.com/users/timmygee/events{/privacy}","received_events_url":"https://api.github.com/users/timmygee/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T05:51:19Z","updated_at":"2016-03-09T05:51:19Z","body":"+1 for a fix for this issue.\r\n\r\nAutoform._validateField seems to have no effect when run. AutoForm.validateField triggers some but not all validation on my form"}}