Skip to content

Validation Callbacks #485

@bogdan

Description

@bogdan

Is it possible to define BeforeValidation callbacks on Model like:

class A {
  @IsDefined()
  hash: string
  @IsDefined()
  content: string
  
  @BeforeValidate
  setHash() {
     this.hash = sha256(this.content)
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureIssues related to new features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions