{"id":23213591,"url":"https://github.com/careydevelopment/carey-validation","last_synced_at":"2026-04-27T00:31:56.520Z","repository":{"id":48405472,"uuid":"377314953","full_name":"careydevelopment/carey-validation","owner":"careydevelopment","description":"Library for streamlining error displays in Angular apps","archived":false,"fork":false,"pushed_at":"2021-07-27T19:23:01.000Z","size":247,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-29T11:39:05.632Z","etag":null,"topics":["angular","validation"],"latest_commit_sha":null,"homepage":"","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/careydevelopment.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":"2021-06-15T23:11:03.000Z","updated_at":"2021-07-27T19:22:10.000Z","dependencies_parsed_at":"2022-08-24T09:32:21.803Z","dependency_job_id":null,"html_url":"https://github.com/careydevelopment/carey-validation","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/careydevelopment/carey-validation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/careydevelopment%2Fcarey-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/careydevelopment%2Fcarey-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/careydevelopment%2Fcarey-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/careydevelopment%2Fcarey-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/careydevelopment","download_url":"https://codeload.github.com/careydevelopment/carey-validation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/careydevelopment%2Fcarey-validation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32318417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"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":["angular","validation"],"created_at":"2024-12-18T19:18:17.288Z","updated_at":"2026-04-27T00:31:56.504Z","avatar_url":"https://github.com/careydevelopment.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Carey Development Logo](http://careydevelopment.us/img/branding/careydevelopment-logo-sm.png)\n\n# Carey Development Validation for Angular Material Forms \n\n![license](https://img.shields.io/badge/license-MIT-blue.svg) \n\n\n## Overview\nThis package streamlines validation displays for Angular Material forms.\n\nThe point is to reduce the amount of code developers need to add to display validation\nerrors on forms.\n\nThe code handles two types of error displays:\n1. **Individual errors** - errors that typically appear next to or below the erroneous field.\n2. **Summary errors** - lists that summarize all errors on a form, usually displayed at the top or bottom of the form.\n\nAs of now, the package only supports Angular Material forms. \n\n## Usage: Installation\nIt's easy to install this package:\n```\nnpm install carey-validation\n```\n\nOnce you've installed it, you can begin using it as described below.\n\n## Usage: Individual Error Messages\nThe easiest way to add error display to a form is with the `\u003cmat-error\u003e` element. For example:\n```\n\u003cmat-error fieldLabel=\"First name\" [simpleValidation]=\"basicInfoFormGroup.get('firstName')\"\u003e\u003c/mat-error\u003e\n```\n\nThe `fieldLabel` property is optional but helpful. If used, the error will appear with the field name.\nFor example: \"First name is required.\"\n\nIf you omit the `fieldLabel` property, users will see a generic error message: \"This field is required.\"\n\nThe `simpleValidation` takes a form field as its input. It will validate that field according to the\nrules you specify in the component class. Yes, you must still specify the validation rules. \n\n## Usage: Summary Error Messages\nIf you want to display a summary of error messages use the `\u003cerror-spree\u003e` element. For example:\n```\n\u003cerror-spree [errorMessages]=\"errorMessages\"\u003e\u003c/error-spree\u003e\n```\n\nIn the code above, `errorMessages` is an array of strings representing all errors on the entire form.\n\nYou can get all errors with the help of the `ValidationService` class provided in this package. For example:\u003cbr/\u003e\n```\nlet basicInfoForm: FormGroup = basicInfoComponent.basicInfoFormGroup;\nlet errorMessages: string[] = this.validationService.validateForm(basicInfoForm);\n```\n\nThat will grab all the errors from that form.\n\nA caveat, though: you need to configure error messages for fields not covered by the package.\n\nAs it stands now, the package will provide default messages for fields with the following names:\n- firstName\n- lastName\n- email\n\nIf you want to provide messages for other fields, you can add them as an array in the `fieldSummaries`\nproperty of the configuration object.\n\nAn example:\u003cbr/\u003e\n```\nexport const allFieldSummaries: ErrorFieldMessage[] = [\n  {\n    field: \"source\",\n    message: \"Please enter a valid source\"\n  },\n  {\n    field: \"status\",\n    message: \"Please enter a valid status\"\n  },\n  {\n    field: \"account\",\n    message: \"Please enter a valid account\"\n  }\n];\n```\n\nThen just specify that array when importing the module as follows:\u003cbr/\u003e\n`ValidationModule.forRoot({ fieldSummaries : allFieldSummaries })`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcareydevelopment%2Fcarey-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcareydevelopment%2Fcarey-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcareydevelopment%2Fcarey-validation/lists"}