npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

carey-validation

v1.0.0

Published

![Carey Development Logo](http://careydevelopment.us/img/branding/careydevelopment-logo-sm.png)

Readme

Carey Development Logo

Carey Development Angular Validation

license

Overview

This package streamlines validation displays for Angular Material forms.

The point is to reduce the amount of code developers need to add to display validation errors on forms.

The library handles two types of error displays:

  1. Individual errors - errors that typically appear next to or below the erroneous field.
  2. Summary errors - lists that summarize all errors on a form, usually displayed at the top or bottom of the form.

As of now, the library only supports Angular Material forms.

Usage: Individual Error Messages

The easiest way to add error display to a form is with the <mat-error> element. For example: <mat-error fieldLabel="First name" [simpleValidation]="basicInfoFormGroup.get('firstName')"></mat-error>

The fieldLabel property is optional but helpful. If used, the error will appear with the field name. For example: "First name is required."

If you omit the fieldLabel property, users will see a generic error message: "This field is required."

The simpleValidation takes a form field as its input. It will validate that field according to the rules you specify in the component class. Yes, you must still specify the validation rules.

Usage: Summary Error Messages

If you want to display a summary of error messages use the <error-spree> element. For example: <error-spree [errorMessages]="errorMessages"></error-spree>

In the code above, errorMessages is an array of strings representing all errors on the entire form.

You can get all errors with the help of the ValidationService class provided in this library. For example: let basicInfoForm: FormGroup = basicInfoComponent.basicInfoFormGroup; let errorMessages: string[] = this.validationService.validateForm(basicInfoForm);

That will grab all the errors from that form.

A caveat, though: you need to configure error messages for fields not covered by the library.

As it stands now, the library will provide default messages for fields with the following names:

  • firstName
  • lastName
  • email

If you want to provide messages for other fields, you can add them as an array in the fieldSummaries property of the configuration object.

An example: export const allFieldSummaries: ErrorFieldMessage[] = [ { field: "source", message: "Please enter a valid source" }, { field: "status", message: "Please enter a valid status" }, { field: "account", message: "Please enter a valid account" } ];

Then just specify that array when importing the module as follows: ValidationModule.forRoot({ fieldSummaries : allFieldSummaries })