{"id":41207714,"url":"https://github.com/andreiduca/slim-validation","last_synced_at":"2026-01-22T22:21:55.059Z","repository":{"id":57363216,"uuid":"41494245","full_name":"andreiduca/slim-validation","owner":"andreiduca","description":"Lightweight jQuery validation plugin.","archived":false,"fork":false,"pushed_at":"2016-02-19T09:21:38.000Z","size":215,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T16:25:47.909Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreiduca.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}},"created_at":"2015-08-27T15:14:37.000Z","updated_at":"2016-02-18T13:31:44.000Z","dependencies_parsed_at":"2022-09-26T16:32:24.669Z","dependency_job_id":null,"html_url":"https://github.com/andreiduca/slim-validation","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/andreiduca/slim-validation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreiduca%2Fslim-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreiduca%2Fslim-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreiduca%2Fslim-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreiduca%2Fslim-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreiduca","download_url":"https://codeload.github.com/andreiduca/slim-validation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreiduca%2Fslim-validation/sbom","scorecard":{"id":192714,"data":{"date":"2025-08-11","repo":{"name":"github.com/andreiduca/slim-validation","commit":"5255eba54d1df03bfe5416f5b6f345834dd95ef7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T21:07:48.895Z","repository_id":57363216,"created_at":"2025-08-16T21:07:48.895Z","updated_at":"2025-08-16T21:07:48.895Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28673219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T20:48:19.482Z","status":"ssl_error","status_checked_at":"2026-01-22T20:48:14.968Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-22T22:21:54.462Z","updated_at":"2026-01-22T22:21:55.043Z","avatar_url":"https://github.com/andreiduca.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# slim-validation\nLightweight jQuery validation plugin.\n\n[![devDependency Status](https://david-dm.org/andreiduca/slim-validation/dev-status.svg)](https://david-dm.org/andreiduca/slim-validation#info=devDependencies)\n[![codecov.io](http://codecov.io/github/andreiduca/slim-validation/coverage.svg?branch=master)](http://codecov.io/github/andreiduca/slim-validation?branch=master)\n[![Build Status](https://travis-ci.org/andreiduca/slim-validation.svg?branch=master)](https://travis-ci.org/andreiduca/slim-validation)\n\n### Instalation\n**node:** `npm install slim-validation` :sparkling_heart:\n\n**git:** `git clone https://github.com/andreiduca/slim-validation.git`\n\nor download the ZIP archive, extract and use the files from the `/src` folder. See `/demo/index.html` for a quick implementation.\n\n## Usage\nHTML-only setup required. Just set the \"data-validate\" custom attribute on your inputs and you're ready to go:\n\n```\n\u003cinput type=\"text\" data-validate=\"required\" /\u003e\n```\n\nChain multiple validation rules using the empty space as a delimiter:\n\n```\n\u003cinput type=\"text\" data-validate=\"required email\" /\u003e\n```\n\n## Validation behavior\nThe validation action is triggered by default on the \"blur\" event on each input.\n\nAfter each validation, a custom event is triggered so you can bind your own behavior to it, like this:\n\n```\n$('body').on('validation:end', '[data-validate]', function(event, $input, value, isValid, errorMessage) {\n    // ... your code goes here\n});\n```\n\nNotice the parameters you can use at your own disposal. Use your imagination!\n\nIn the demo HTML I only added a colored border and error message after each input to highlight its status:\n\n```\n$('body').on('validation:end', '[data-validate]', function(event, $input, value, isValid, errorMessage) {\n\n    $input.next('span').remove();\n\n    if (!isValid) {\n        $input.after('\u003cspan style=\"color:red;\"\u003e' + errorMessage + '\u003c/span\u003e');\n        $input.css({\"border\": \"1px solid red\"});\n    }\n    else {\n        $input.after('\u003cspan style=\"color:green;\"\u003edata is valid\u003c/span\u003e');\n        $input.css({\"border\": \"1px solid green\"});\n    }\n});\n```\n\n**Note:** `$input` is a jQuery wrapper of the actual input being validated.\n\n## Form validation\nYou can also validate an entire form at once.\n \n```\n$(\"#testForm\").validateForm();\n```\n\nWhen a form is validated, all containing HTML elements having the `data-validate` attribute will be validated.\n\nIn the end, another custom event is triggered:\n\n```\n$('body').on('validation:form', '#testForm', function(event, $form, isValid, $firstErrorInput) {\n    // ... your code goes here\n});\n ```\n \nYou can see if the `$form` has errors or not with the `isValid` parameter and you can, for example, scroll to the `$firstErrorInput` and focus it.\n\n## Error messages\nError messages are also defined with custom \"data-\" attributes:\n\n```\n\u003cinput type=\"text\" data-validate=\"required\" data-error=\"invalid data\" /\u003e\n```\n\nCustom error messages for each validation rule can also be defined:\n\n```\n\u003cinput type=\"text\" data-validate=\"required email\"\n        data-error=\"generic error\"\n        data-error-email=\"Invalid email\" /\u003e\n```\n\nThis is great for internationalized websites where you need translated error messages, and works best with template engines such as smarty or twig. Yes: no more javascript files filled with translated messages!\n\n## Advanced validation rules\nSome rules require a configurable parameter, like a number to compare against. It's simple: just add the number after that rule:\n\n```\n\u003cinput type=\"text\" data-validate=\"minLength 3\" /\u003e\n```\n\nMore rules for the same input? Just chain them as usual.\n\n\n## Validations rules reference:\n(This is a work in progress)\n\n- `required`: the value must not be an empty string;\n- `requiredBy`: the value must not be empty **only if** a related input is not empty;\n- `numeric`: the value must contain only digits;\n- `integer`: the value must be a valid integer (negative values allowed);\n- `min`: the value must be an integer greater than or equal to the provided parameter;\n- `max`: the value must be an integer lower than or equal to the provided parameter;\n- `range`: the value must be an integer in the range provided using the format `1..10`;\n- `number`: the value must match one of the following number formats: `-12345.6789`, `-12345,6789`, `-12,345.6789`, `-12.345,6789` (the negative sign and the fractional part are optional);\n- `minLength`: the value's length must be more than or equal to the provided parameter;\n- `maxLength`: the value's length must be less than or equal to the provided parameter;\n- `email`: the value must match a \"practical RFC 5322\" regex: (see http://www.regular-expressions.info/email.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreiduca%2Fslim-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreiduca%2Fslim-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreiduca%2Fslim-validation/lists"}