form-control-errors
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.0 • Public • Published

    This is a package built to make displaying validation errors from Angular Form Controls easier.

    Installation

    In module:

    import { NgFormErrorsModule } from 'form-control-errors'    
    ...
    imports: [
        ...       
        NgFormErrorsModule,       
        ...      
    ]

    Use

    <lib-form-errors [form]="exampleForm" [errorMsgs]="errorMsgs"></lib-form-errors>

    form should be an Angular form group
    errorMsgs should be an object of the following format

    {
      email: 'is not formatted correctly',
      required: 'is required'
    }

    where the key is the error key returned by the validator and the value is the message to display

    Install

    npm i form-control-errors

    DownloadsWeekly Downloads

    2

    Version

    0.2.0

    License

    none

    Unpacked Size

    78.4 kB

    Total Files

    32

    Last publish

    Collaborators

    • travis.kovar