{"id":16601749,"url":"https://github.com/biyuqi/simplecheck","last_synced_at":"2026-04-22T06:02:13.874Z","repository":{"id":96719346,"uuid":"81542926","full_name":"BiYuqi/SimpleCheck","owner":"BiYuqi","description":"Js 表单验证代码小插件 支持二级校验(内置:为空校验+自定义校验)","archived":false,"fork":false,"pushed_at":"2017-02-10T12:24:08.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-16T08:22:43.250Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BiYuqi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-10T08:15:08.000Z","updated_at":"2017-02-10T08:26:15.000Z","dependencies_parsed_at":"2024-02-21T21:47:26.942Z","dependency_job_id":null,"html_url":"https://github.com/BiYuqi/SimpleCheck","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BiYuqi/SimpleCheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiYuqi%2FSimpleCheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiYuqi%2FSimpleCheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiYuqi%2FSimpleCheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiYuqi%2FSimpleCheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BiYuqi","download_url":"https://codeload.github.com/BiYuqi/SimpleCheck/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiYuqi%2FSimpleCheck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32123604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"online","status_checked_at":"2026-04-22T02:00:05.693Z","response_time":58,"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-10-12T00:19:10.330Z","updated_at":"2026-04-22T06:02:13.857Z","avatar_url":"https://github.com/BiYuqi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleCheck\nJs 表单验证代码小插件 支持二级校验(内置:为空校验+自定义校验)\n### 使用方法\n```javascript\n#克隆项目\ngit clone https://github.com/BiYuqi/SimpleCheck.git\n```\n###正确引入js文件\n```javascript\n\u003cscript src=\"checkSimple.js\"\u003e\u003c/script\u003e\n```\n###API\n```javascript\n/*\n*@target    //目标元素\n*@reg       //校验规则\n*@tips     //提示框元素\n*@tipsText    //正则对应的提示文字\n*@isBlank     // true表示不能为空\n*@isBlankText   //为空时提示文本\n*/\n传参是个数组对象\n举个例子:\nex:var ooo = [\n                {\n                    target:'.user-name',//目标元素\n                    reg:/[a-zA-Z_]{6,}/,//校验规则\n                    tips:'.tips',//提示框元素\n                    tipsText:'此处只能是字母下划线(字母不计大小写)',//正则对应的提示文字\n                    isBlank:true,// true表示不能为空\n                    isBlankText:'输入不能为空'//为空时提示文本\n                }\n              ]\n```\n### DEMO\n```html\n\u003cdiv class=\"box\"\u003e\n    \u003cdiv\u003e\n        姓名：\u003cinput type=\"text\" class=\"user-name\" placeholder=\"此处只能是字母下划线(字母不计大小写)\"\u003e\u003cspan class=\"tips\"\u003e\u003c/span\u003e\n    \u003c/div\u003e\n    \u003cdiv\u003e\n        密码：\u003cinput type=\"text\" class=\"user-pass\" placeholder=\"字母数字下划线,6~16位\"\u003e\u003cspan class=\"tips\"\u003e\u003c/span\u003e\n    \u003c/div\u003e\n    \u003cdiv\u003e\n        财富: \u003cinput type=\"text\" class=\"user-age\" placeholder=\"只能为数字,最多精确到小数1位\"\u003e\u003cspan class=\"tips\"\u003e\u003c/span\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n```javascript\n//写规则\nvar ooo = [\n            {\n                target:'.user-name',//目标元素 id class皆可\n                reg:/[a-zA-Z_]{6,}/,//校验规则\n                tips:'.tips',//提示框元素\n                tipsText:'此处只能是字母下划线(字母不计大小写)',//正则对应的提示文字\n                isBlank:true,// true表示不能为空\n                isBlankText:'输入不能为空'//为空时提示文本\n            },\n            {\n                target:'.user-pass',\n                reg:/[\\w]{6,16}/,\n                tips:'.tips',\n                tipsText:'字母数字下划线,6~16位',\n                isBlank:true,//不可以为空\n                isBlankText:'输入不能为空'\n            },\n            {\n                target:'.user-age',\n                reg:/^(([1-9]+(\\.[0-9]{1})?)||(^0\\.[1-9]{1}))$/,\n                tips:'.tips',\n                tipsText:'小数最多精确到分',\n                isBlank:false,//可以为空\n                isBlankText:'输入不能为空'\n            }\n        ];\n //传参调用即可  \n CheckSimple(ooo)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiyuqi%2Fsimplecheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiyuqi%2Fsimplecheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiyuqi%2Fsimplecheck/lists"}