@join-com/typeorm-class-validator-is-frozen-when-preset
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0 • Public • Published

    Is frozen when preset validator for class-validator and typeorm

    Custom validator for class-validator and typeorm

    It validates that a field can not be changed once it was set before.

    Installation

    npm install @join-com/typeorm-class-validator-is-frozen-when-preset --save
    

    Usage

    You can use the validator as any other class-validator:

    @Entity()
    class User {
      @PrimaryGeneratedColumn()
      public id: number;
    
      // Raises a validation error when the field is updated
      @IsFrozenWhenPreset()
      @Column({ type: 'int', nullable: true })
      public companyId?: number;
    }

    Install

    npm i @join-com/typeorm-class-validator-is-frozen-when-preset

    DownloadsWeekly Downloads

    49

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    7.21 kB

    Total Files

    11

    Last publish

    Collaborators

    • michal.baran
    • alaa-awad
    • szymonszklarskijoin
    • sayda
    • oahmedqureshi
    • mohamedatta
    • kevincharecki
    • dlljoin
    • ashraaf.ateef
    • igocooper
    • yosri.mimouna
    • vitalii.pasiuta
    • pawelrozumek
    • elgayar
    • taciobelmonte
    • join-dev
    • pavlo.naumenko
    • ntnnk
    • adam187
    • favorit13
    • kirpichenkoo
    • tcichowicz
    • mayada
    • jakubspringer
    • boris.lapouga.join
    • readonly-user-join-com
    • cannoneer
    • lerbigdev
    • 12m3r