{"action":"closed","issue":{"url":"https://api.github.com/repos/nosir/cleave.js/issues/37","repository_url":"https://api.github.com/repos/nosir/cleave.js","labels_url":"https://api.github.com/repos/nosir/cleave.js/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/nosir/cleave.js/issues/37/comments","events_url":"https://api.github.com/repos/nosir/cleave.js/issues/37/events","html_url":"https://github.com/nosir/cleave.js/issues/37","id":165643711,"number":37,"title":"Support multiple delimiters","user":{"login":"vicentedealencar","id":1762868,"avatar_url":"https://avatars.githubusercontent.com/u/1762868?v=3","gravatar_id":"","url":"https://api.github.com/users/vicentedealencar","html_url":"https://github.com/vicentedealencar","followers_url":"https://api.github.com/users/vicentedealencar/followers","following_url":"https://api.github.com/users/vicentedealencar/following{/other_user}","gists_url":"https://api.github.com/users/vicentedealencar/gists{/gist_id}","starred_url":"https://api.github.com/users/vicentedealencar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicentedealencar/subscriptions","organizations_url":"https://api.github.com/users/vicentedealencar/orgs","repos_url":"https://api.github.com/users/vicentedealencar/repos","events_url":"https://api.github.com/users/vicentedealencar/events{/privacy}","received_events_url":"https://api.github.com/users/vicentedealencar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nosir/cleave.js/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-07-14T19:49:50Z","updated_at":"2016-08-01T13:16:57Z","closed_at":"2016-08-01T13:16:57Z","body":"Today there is only support for a single delimiter, so some more complex patterns can't be done.\r\n\r\nSome examples:\r\n- `999.999.999-99` BR CPF (like US social security for BR people)\r\n- `(99)99999-9999` BR phone\r\n\r\nMy proposal to fix that is add `delimiters` option that would take a array of delimiters, each to be used one time in the rigth order between blocks. This wouldn't add breaking changes. Maybe some validations should be applied like not allowing both `delimiter` and `delimiters` at the same time, and `delimiters.length === blocks.length - 1`.\r\n\r\nThe options passed to a CPF input would be\r\n```\r\n{\r\n  blocks: [3,3,3,2], \r\n  delimiters: ['.', '.', '-'], \r\n  numericOnly: true\r\n}\r\n```"}}
{"actor":{"display_login":"nosir"}}