{"id":22904011,"url":"https://github.com/json2d/jquery.input-allow","last_synced_at":"2025-07-31T08:42:28.174Z","repository":{"id":95070360,"uuid":"46043090","full_name":"json2d/jquery.input-allow","owner":"json2d","description":"A jQuery plugin that provides lightweight unobtrusive real-time regEx filtering for individual characters entered into input fields. ","archived":false,"fork":false,"pushed_at":"2015-11-12T09:40:30.000Z","size":0,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-17T04:07:02.363Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/json2d.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-12T09:36:27.000Z","updated_at":"2019-09-06T09:13:01.000Z","dependencies_parsed_at":"2023-03-10T15:15:12.462Z","dependency_job_id":null,"html_url":"https://github.com/json2d/jquery.input-allow","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/json2d/jquery.input-allow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/json2d%2Fjquery.input-allow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/json2d%2Fjquery.input-allow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/json2d%2Fjquery.input-allow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/json2d%2Fjquery.input-allow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/json2d","download_url":"https://codeload.github.com/json2d/jquery.input-allow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/json2d%2Fjquery.input-allow/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268015389,"owners_count":24181638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-14T02:39:54.968Z","updated_at":"2025-07-31T08:42:28.096Z","avatar_url":"https://github.com/json2d.png","language":"JavaScript","readme":"# jquery.input-allow v0.1\n*by Jason Yung - [http://callmejay.com](http://callmejay.com \"http://callmejay.com\")*\n\n A [jQuery](http://jquery.com) plugin that provides lightweight unobtrusive real-time regEx filtering for individual characters entered into input fields.  \n\n### Basic Usage\nSimply use the **allow** attribute on any **input** tag to specify a regEx to filter by. \n```html\n\u003cinput class=\"digits-only\" type=\"text\" allow=\"[0-9]\"/\u003e\n\n\u003cinput class=\"alpha-only\" type=\"text\" allow=\"[a-z]\"/\u003e\n\t\n\u003cinput class=\"special-only\" type=\"text\" allow=\"[\\-!@#$%\\^\u0026*()_+=\\:;\u003c\u003e]\"/\u003e\n```\n### Dynamic Content Support\nThe plugin uses `$('body').delegate(...)` to bind its core handlers to any and every **input** tag that has an **allow** attribute defined, including those added dynamically:\n```javascript\n$('body').append(\"\u003cinput type='text' allow='[a-z]'\u003e\"); //works out of the box!\n```\n### Events\nEach character entered into a filtered input field is compared to some regEx:\n\n- If a character matches, the **input** element will trigger an **input-allow.pass** event\n- If a character does not match, the **input** element will trigger an **input-allow.fail** event\n\nTo bind a handler to these events, you can use `on` or `delegate`:\n```javascript\n$('input[allow]').on('input-allow.fail', function(event) {\n\tevent.target.css('background','red'); //input was bad - color the element red\n});\n\n// dynamic content support\n$('body').delegate('input-allow.pass', 'input[allow]',function(event){\n\tevent.target.css('background','green'); //input was good - color the element green\n});\t\n```\n### Known Issues\n- Edge cases were not really considered.\n\n### Roadmap\nTODO\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjson2d%2Fjquery.input-allow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjson2d%2Fjquery.input-allow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjson2d%2Fjquery.input-allow/lists"}