{"action":"created","issue":{"url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/75","labels_url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/75/comments","events_url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/75/events","html_url":"https://github.com/offirgolan/ember-cp-validations/issues/75","id":117653137,"number":75,"title":"Applying multiple separate regex validations possible?","user":{"login":"rox163","id":313318,"avatar_url":"https://avatars.githubusercontent.com/u/313318?v=3","gravatar_id":"","url":"https://api.github.com/users/rox163","html_url":"https://github.com/rox163","followers_url":"https://api.github.com/users/rox163/followers","following_url":"https://api.github.com/users/rox163/following{/other_user}","gists_url":"https://api.github.com/users/rox163/gists{/gist_id}","starred_url":"https://api.github.com/users/rox163/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rox163/subscriptions","organizations_url":"https://api.github.com/users/rox163/orgs","repos_url":"https://api.github.com/users/rox163/repos","events_url":"https://api.github.com/users/rox163/events{/privacy}","received_events_url":"https://api.github.com/users/rox163/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-18T18:45:19Z","updated_at":"2015-11-18T19:25:24Z","closed_at":"2015-11-18T19:22:04Z","body":"I have 2 different regex validation options available as utils for my password field. The user can use one or both validations in the model. In the example below we want to have special characters and numbers in the password. I am seeing weird behaviour when applying multiple regex like this - \r\n```\r\nvalidationsPassword: [\r\n\t\tvalidator('presence', true),\r\n\t\t//problem combining regex checks\r\n\t\tvalidator('format', {\r\n\t\t    regex: /(?=.*[!@#$%\\^&*)(+=._-])/g,\r\n\t\t    message: \"Must contain special characters\"\r\n\t        }),\r\n\t\tvalidator('format', {\r\n\t\t    regex: /\\d/g,\r\n\t\t    message: \"Must contain digits\"\r\n\t        }),\r\n\t\tvalidator('length', {min: 6})\r\n\t]\r\n```\r\n\r\nWhen I put in 'a4$' for example in the field, after typing the '$', it shows the Must contain digits error. After entering another number, it says 'The field is invalid'\r\nHow can I apply these regex validators separately, on the same field?\r\n"},"comment":{"url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/comments/157830930","html_url":"https://github.com/offirgolan/ember-cp-validations/issues/75#issuecomment-157830930","issue_url":"https://api.github.com/repos/offirgolan/ember-cp-validations/issues/75","id":157830930,"user":{"login":"offirgolan","id":575938,"avatar_url":"https://avatars.githubusercontent.com/u/575938?v=3","gravatar_id":"","url":"https://api.github.com/users/offirgolan","html_url":"https://github.com/offirgolan","followers_url":"https://api.github.com/users/offirgolan/followers","following_url":"https://api.github.com/users/offirgolan/following{/other_user}","gists_url":"https://api.github.com/users/offirgolan/gists{/gist_id}","starred_url":"https://api.github.com/users/offirgolan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/offirgolan/subscriptions","organizations_url":"https://api.github.com/users/offirgolan/orgs","repos_url":"https://api.github.com/users/offirgolan/repos","events_url":"https://api.github.com/users/offirgolan/events{/privacy}","received_events_url":"https://api.github.com/users/offirgolan/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T19:25:24Z","updated_at":"2015-11-18T19:25:24Z","body":"No problem! Glad it worked :smile_cat: "}}