aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/shared/form-validators/form-validator.model.ts
blob: 1e4bba86b55261d36bebc463c32fe7dbaeb9f2bd (plain) (tree)
1
2
3
4
5
6
                                                              

                                  
                           

                                       







                                                        
                                                                                 
 
import { AsyncValidatorFn, ValidatorFn } from '@angular/forms'

export type BuildFormValidator = {
  VALIDATORS: ValidatorFn[]
  ASYNC_VALIDATORS?: AsyncValidatorFn[]

  MESSAGES: { [ name: string ]: string }
}

export type BuildFormArgument = {
  [ id: string ]: BuildFormValidator | BuildFormArgument
}

export type BuildFormDefaultValues = {
  [ name: string ]: boolean | number | string | string[] | BuildFormDefaultValues
}