{"id":18418556,"url":"https://github.com/bsm/validation-rules-js","last_synced_at":"2026-03-10T10:31:51.723Z","repository":{"id":46086116,"uuid":"255968291","full_name":"bsm/validation-rules-js","owner":"bsm","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-18T14:35:02.000Z","size":507,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-08T08:54:07.362Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bsm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-04-15T16:01:26.000Z","updated_at":"2021-11-15T15:40:22.000Z","dependencies_parsed_at":"2022-09-26T17:11:01.658Z","dependency_job_id":"36db7de4-884a-491b-8f13-5afd049332e8","html_url":"https://github.com/bsm/validation-rules-js","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"3bb816e338417532d5cde7ab89e5f6ea29f5f935"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bsm/validation-rules-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fvalidation-rules-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fvalidation-rules-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fvalidation-rules-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fvalidation-rules-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsm","download_url":"https://codeload.github.com/bsm/validation-rules-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsm%2Fvalidation-rules-js/sbom","scorecard":{"id":256311,"data":{"date":"2025-08-11","repo":{"name":"github.com/bsm/validation-rules-js","commit":"d0044271181276c35c1422791744fd91591bdaf7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"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":"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":"Code-Review","score":3,"reason":"Found 3/8 approved changesets -- score normalized to 3","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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yaml:1","Info: no jobLevel write permissions found"],"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":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/bsm/validation-rules-js/test.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/bsm/validation-rules-js/test.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yaml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/bsm/validation-rules-js/test.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yaml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/bsm/validation-rules-js/test.yaml/main?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"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":"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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"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 'main'"],"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T09:48:05.877Z","repository_id":46086116,"created_at":"2025-08-17T09:48:05.877Z","updated_at":"2025-08-17T09:48:05.877Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30330556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: 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":"2024-11-06T04:13:58.918Z","updated_at":"2026-03-10T10:31:51.692Z","avatar_url":"https://github.com/bsm.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BSM Validation Rules\n\nValidation rule builder, written in TypeScript.\n\n## Usage\n\n```javascript\nimport vrb from 'bsm-validation-rules';\n\nconst percentage = [\n  vrb.typeOf('number'),\n  vrb.numericality({ min: 0, max: 100 }),\n];\n\nconst tag = [\n  vrb.presence(),\n  vrb.typeOf('string'),\n  vrb.length({ max: 20 }),\n];\n\nexport const taskRules = {\n  title: [\n    vrb.presence(),\n    vrb.typeOf('string'),\n    vrb.length({ max: 50 }),\n  ],\n  status: [\n    vrb.presence(),\n    vrb.typeOf('string'),\n    vrb.inclusion(['pending', 'complete']),\n  ],\n  progress: [\n    vrb.presence(),\n    ...percentage,\n  ],\n  tags: [\n    vrb.typeOf('array'),\n    vrb.every([tag]),\n  ]\n});\n```\n\nIn Vue/Vuetify:\n\n```vue\n\u003ctemplate\u003e\n  \u003cv-container fluid\u003e\n    \u003cv-row align=\"center\"\u003e\n      \u003cv-col cols=\"6\"\u003e\n        \u003cv-text-field\n          v-model=\"item.email\"\n          label=\"Email\"\n          :rules=\"rules.email\"\n        \u003e\u003c/v-text-field\u003e\n      \u003c/v-col\u003e\n\n      \u003cv-col cols=\"6\"\u003e\n        \u003cv-select\n          v-model=\"item.state\"\n          label=\"State\"\n          :rules=\"rules.email\"\n          :items=\"states\"\n          item-text=\"state\"\n          item-value=\"abbr\"\n          return-object\n        \u003e\u003c/v-select\u003e\n      \u003c/v-col\u003e\n    \u003c/v-row\u003e\n  \u003c/v-container\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nimport vrb from 'bsm-validation-rules';\n\nconst rules = {\n  email: [\n    vrb.presence(),\n    vrb.typeOf('string'),\n    vrb.format(/\\S+@\\S+\\.\\S+/),\n  ],\n  state: [\n    vrb.dig('abbr', [\n      vrb.presence(),\n      vrb.typeOf('string'),\n    ]),\n  ],\n};\n\nexport default {\n  data: () =\u003e ({\n    rules,\n    item: {},\n    states: [\n      { state: 'Florida', abbr: 'FL' },\n      { state: 'Georgia', abbr: 'GA' },\n      { state: 'Nebraska', abbr: 'NE' },\n      { state: 'California', abbr: 'CA' },\n      { state: 'New York', abbr: 'NY' },\n    ],\n  }),\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsm%2Fvalidation-rules-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsm%2Fvalidation-rules-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsm%2Fvalidation-rules-js/lists"}