File

src/validation/validation.model.ts

Index

Properties
Methods

Constructor

constructor(type: ValidationType, message: string)
Parameters :
Name Type Optional Description
type ValidationType
message string

Methods

Public isRequired
isRequired()
Returns : boolean

Properties

Public message
message: string
Type : string
Public type
type: ValidationType
Type : ValidationType
import { ValidationType } from '.';

export abstract class Validation {

  public constructor(
    public type: ValidationType,
    public message: string
  ) { }

  public isRequired(): boolean {
    return ValidationType.REQUIRED === this.type;
  }
}

results matching ""

    No results matching ""