{"id":15046294,"url":"https://github.com/sabrio/ng2-validation-manager","last_synced_at":"2025-10-26T17:31:03.823Z","repository":{"id":71709610,"uuid":"77234439","full_name":"sabrio/ng2-validation-manager","owner":"sabrio","description":"Validation manager library for Angular 2 (based on Laravel Validation method)","archived":false,"fork":false,"pushed_at":"2019-06-11T10:46:41.000Z","size":1346,"stargazers_count":33,"open_issues_count":5,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-19T21:36:24.800Z","etag":null,"topics":["angular-cli","angular-validation","angular2","form-validation","laravel-style","validation","validation-builder"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/sabrio.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}},"created_at":"2016-12-23T15:36:00.000Z","updated_at":"2025-08-20T13:19:37.000Z","dependencies_parsed_at":"2023-02-28T02:45:58.919Z","dependency_job_id":null,"html_url":"https://github.com/sabrio/ng2-validation-manager","commit_stats":{"total_commits":80,"total_committers":4,"mean_commits":20.0,"dds":0.09999999999999998,"last_synced_commit":"e56dddbca93d02f87490483e4306cbbf0df45beb"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/sabrio/ng2-validation-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabrio%2Fng2-validation-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabrio%2Fng2-validation-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabrio%2Fng2-validation-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabrio%2Fng2-validation-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sabrio","download_url":"https://codeload.github.com/sabrio/ng2-validation-manager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sabrio%2Fng2-validation-manager/sbom","scorecard":{"id":794361,"data":{"date":"2025-08-11","repo":{"name":"github.com/sabrio/ng2-validation-manager","commit":"e56dddbca93d02f87490483e4306cbbf0df45beb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"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":"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":1,"reason":"Found 3/23 approved changesets -- score normalized to 1","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":"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":"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":"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":"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":"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":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":"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":"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 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"}}]},"last_synced_at":"2025-08-23T08:30:46.897Z","repository_id":71709610,"created_at":"2025-08-23T08:30:46.897Z","updated_at":"2025-08-23T08:30:46.897Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281140943,"owners_count":26450544,"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-10-26T02:00:06.575Z","response_time":61,"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":["angular-cli","angular-validation","angular2","form-validation","laravel-style","validation","validation-builder"],"created_at":"2024-09-24T20:52:57.661Z","updated_at":"2025-10-26T17:31:03.533Z","avatar_url":"https://github.com/sabrio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003ch1\u003eng2-validation-manager\u003c/h1\u003e\n\n     \n\n\n\n\u003cp\u003e\u003cstrong\u003eng2-validation-manager\u003c/strong\u003e is simple and flexible library for reactive form validation in angular 2+\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://sabrio.github.io/ng2-validation-manager\"\u003eDemo\u003c/a\u003e\u003c/p\u003e\n\n\n\u003ch3 id=\"dbyll-is-on-github\"\u003eMain features\u003c/h3\u003e\n\u003cul class=\"feature-list\"\u003e\n\u003cli\u003e\u0026#x2611; Easy setup\u003c/li\u003e\n  \u003cli\u003e\u0026#x2611; Dynamic messages\u003c/li\u003e\n  \u003cli\u003e\u0026#x2611; +20 validation rules\u003c/li\u003e\n  \u003cli\u003e\u0026#x2611; Custom errors messages\u003c/li\u003e\n  \u003cli\u003e\u0026#x2611; Child FormGroup and FormArray\u003c/li\u003e\n  \u003cli\u003e\u0026#x2610; Multiple languages\u003c/li\u003e\n  \u003cli\u003e\u0026#x2610; Validator Expendable \u003c/li\u003e\n\u003c/ul\u003e\n  \n\n\n\n\u003ch2\u003eInstall\u003c/h2\u003e\n\n \n\u003cpre\u003e\n  \u003ccode\u003enpm i ng2-validation-manager --save\u003c/code\u003e\n\u003c/pre\u003e\n\n\u003ch3\u003eImport\u003c/h3\u003e\n    \n\t  @NgModule({\n\t    imports: [\n\t      ...\n\t      ReactiveFormsModule\n\t    ]\n\t  })\n  \n\u003ch3\u003eUsage\u003c/h3\u003e\n  \n\n  \n    import {ValidationManager} from \"ng2-validation-manager\";\n\n    export class AppComponent implements OnInit{\n\n      form;\n\n      ngOnInit() {\n\n        this.form = new ValidationManager({\n          'name'        : 'required|minLength:4|maxLength:12|alphaSpace',\n          'email'       : 'required|email',\n          'username'    : 'required|pattern:[A-Za-z0-9]+([_\\.][A-Za-z0-9]+)*',\n          'description' : {'rules': 'required|count:15', 'value': 'testing'},\n          'password'    : 'required|rangeLength:8,50',\n          'repassword'  : 'required|equalTo:password'\n        });\n\n        this.form.setValue({\n          'name': 'Default'\n        });\n\n        this.form.setErrorMessage('username', 'pattern', 'Pattern must be part of this family: [A-Za-z0-9.-_]');\n      }\n\n      save(){\n        if(this.form.isValid()){\n          alert('validation pass');\n          console.log(this.form.getData());\n          this.form.reset();\n        }\n      }\n    }\n \n\nand your view would like like:\n\n    \u003cform [formGroup]=\"form.getForm()\" (ngSubmit)=\"save()\"\u003e\n      \u003cdiv class=\"form-group\"\u003e\n        \u003clabel\u003eName\u003c/label\u003e\n        \u003cinput type=\"text\" class=\"form-control\" formControlName=\"name\"\u003e\n        \u003cdiv *ngIf=\"form.hasError('name')\" class=\"alert alert-danger\"\u003e\n            {{form.getError('name')}}\n        \u003c/div\u003e\n      \u003c/div\u003e\n\n      \u003cdiv class=\"form-group\"\u003e\n        \u003clabel\u003eEmail\u003c/label\u003e\n        \u003cinput type=\"text\" class=\"form-control\" formControlName=\"email\"\u003e\n        \u003cdiv *ngIf=\"form.hasError('email')\" class=\"alert alert-danger\"\u003e\n          {{form.getError('email')}}\n        \u003c/div\u003e\n      \u003c/div\u003e\n\n      \u003cdiv class=\"form-group\"\u003e\n        \u003clabel\u003eUsername\u003c/label\u003e\n        \u003cinput type=\"text\" class=\"form-control\" formControlName=\"username\"\u003e\n        \u003cdiv *ngIf=\"form.hasError('username')\" class=\"alert alert-danger\"\u003e\n          {{form.getError('username')}}\n        \u003c/div\u003e\n      \u003c/div\u003e\n\n      \u003cdiv class=\"form-group\"\u003e\n        \u003clabel\u003eDescription\u003c/label\u003e\n        \u003cinput type=\"text\" class=\"form-control\" formControlName=\"description\"\u003e\n        \u003cdiv *ngIf=\"form.hasError('description')\" class=\"alert alert-danger\"\u003e\n          {{form.getError('description')}}\n        \u003c/div\u003e\n      \u003c/div\u003e\n\n      \u003cdiv class=\"form-group\"\u003e\n        \u003clabel\u003ePassword\u003c/label\u003e\n        \u003cinput type=\"password\" class=\"form-control\" formControlName=\"password\"\u003e\n        \u003cdiv *ngIf=\"form.hasError('password')\" class=\"alert alert-danger\"\u003e\n          {{form.getError('password')}}\n        \u003c/div\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"form-group\"\u003e\n        \u003clabel\u003eRE-Password\u003c/label\u003e\n        \u003cinput type=\"repassword\" class=\"form-control\" formControlName=\"repassword\"\u003e\n        \u003cdiv *ngIf=\"form.hasError('repassword')\" class=\"alert alert-danger\"\u003e\n          {{form.getError('repassword')}}\n        \u003c/div\u003e\n      \u003c/div\u003e\n      \u003cbutton type=\"submit\" class=\"btn btn-success\"\u003eSubmit\u003c/button\u003e\n    \u003c/form\u003e\n\t\n \n\u003ch2\u003eValidation manager api\u003c/h2\u003e\n  \n\n| Method| Return           | Description |\n|-------|------------------|-----------------------------------------------------|\n| constructor(obj:{ field: rules }, ['invalid', 'dirty', 'submitted']) | | |\n| getForm() | FormGroup | This method returns the FormGroup |\n| isValid() | boolean | This method checks if the form is valid or not |\n| reset() | void | This method resets the form  | \n| hasError(field) | boolean | This method checks if the form field is valid or not | \n| getError(field) | string | This method returns the error of the field | \n| getErrors() | []:string | This method returns array of errors | \n| setErrorMessage(field, rule, message) | void | This method can change the defualt message of a particular rule  | \n| setValue(field, value) | void | This method sets value of field | \n| getValue(field) | string | This method returns the value of field |\n| getData() | [] =\u003e {field:value} | This method returns array of pair key and value of your form  | \n| getChildGroup(groupName:string, [index:number = null]) | [] =\u003e {field:value} | This method returns child FormGroup or FormArray | \n| addChildGroup(field, mgr: ValidationManager) | [] =\u003e {field:value} |   | \n| removeChildGroup(groupName:string, [index:number = null]) | [] =\u003e {field:value} | This method returns array of pair key and value of your form  | \n\n\u003ch2\u003eValidators\u003c/h2\u003e\n  \nThe current validators/rules\n\n\u003cb\u003eNote:\u003c/b\u003e Validation rules are \u003cb\u003ecase-sensitive\u003c/b\u003e\u003c/div\u003e\n  \n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#required\"\u003erequired\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#number\"\u003enumber\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#date\"\u003edate\u003c/a\u003e\u003c/div\u003e\n\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#alpha\"\u003ealpha\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#digits\"\u003edigits\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#minDate\"\u003eminDate\u003c/a\u003e\u003c/div\u003e\n\n\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#alphaNum\"\u003ealphaNum\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#minLength\"\u003eminLength\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#maxDate\"\u003emaxDate\u003c/a\u003e\u003c/div\u003e\n\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#alphaSpace\"\u003ealphaSpace\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#maxLength\"\u003emaxLength\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#dateISO\"\u003edateISO\u003c/a\u003e\u003c/div\u003e\n\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#alphanNumSpace\"\u003ealphaNumSpace\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#range\"\u003erange\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#rangeLength\"\u003erangeLength\u003c/a\u003e\u003c/div\u003e\n\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#max\"\u003emax\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#min\"\u003emin\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#email\"\u003eemail\u003c/a\u003e\u003c/div\u003e\n\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#equal\"\u003eequal\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#equalTo\"\u003eequalTo\u003c/a\u003e\u003c/div\u003e\n\n\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#equalTo\"\u003epattern\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"col-md-4\"\u003e\u003ca href=\"#equalTo\"\u003ecount\u003c/a\u003e\u003c/div\u003e\n\n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsabrio%2Fng2-validation-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsabrio%2Fng2-validation-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsabrio%2Fng2-validation-manager/lists"}