{"action":"opened","issue":{"url":"https://api.github.com/repos/on-site/guards.js/issues/24","labels_url":"https://api.github.com/repos/on-site/guards.js/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/on-site/guards.js/issues/24/comments","events_url":"https://api.github.com/repos/on-site/guards.js/issues/24/events","html_url":"https://github.com/on-site/guards.js/issues/24","id":84258302,"number":24,"title":"MoneyUS guard not working with min data attributes (data-guard-moneyUS-min)","user":{"login":"dave5104","id":955162,"avatar_url":"https://avatars.githubusercontent.com/u/955162?v=3","gravatar_id":"","url":"https://api.github.com/users/dave5104","html_url":"https://github.com/dave5104","followers_url":"https://api.github.com/users/dave5104/followers","following_url":"https://api.github.com/users/dave5104/following{/other_user}","gists_url":"https://api.github.com/users/dave5104/gists{/gist_id}","starred_url":"https://api.github.com/users/dave5104/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dave5104/subscriptions","organizations_url":"https://api.github.com/users/dave5104/orgs","repos_url":"https://api.github.com/users/dave5104/repos","events_url":"https://api.github.com/users/dave5104/events{/privacy}","received_events_url":"https://api.github.com/users/dave5104/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-02T23:21:10Z","updated_at":"2015-06-02T23:21:10Z","closed_at":null,"body":"On line 2487 in src/guards.js:\r\n\r\n```\r\nvar attrPrefix = this._guards.camelize(dashedAttrPrefix.replace(/-+$/, \"\"));\r\n```\r\n\r\nFor a moneyUS named guard, this assigns \"guardMoneyUS\" to attrPrefix. But then on line 2495, when data is mapped, data looks like this:\r\n\r\n```\r\ndata = Object {guardMoneyusMin: 1, guard: \"moneyUS\"}\r\n```\r\n\r\nAnd guardMoneyus won't match up with guardMoneyUS.\r\n\r\nHowever, if you set a breakpoint on line 2487 above when it's evaluating the guard, and in the console, set attrPrefix = \"guardMoneyus\", it works like a charm.\r\n\r\ntl;dr Guards just doesn't like that the named guard has capital letters at the end."}}