src/app/shared/dynamic-form/models/dynamic-form-input.model.ts
Properties |
|
| defaultValue |
defaultValue:
|
Type : T
|
| Optional |
| errors |
errors:
|
Type : FormError[]
|
| Optional |
| hint |
hint:
|
Type : string
|
| Optional |
| label |
label:
|
Type : string
|
| Optional |
| name |
name:
|
Type : string
|
| placeholder |
placeholder:
|
Type : string
|
| Optional |
| type |
type:
|
Type : string
|
| validators |
validators:
|
Type : ValidatorFn | ValidatorFn[]
|
| Optional |
import { ValidatorFn } from '@angular/forms'
import { SafeHtml } from '@angular/platform-browser'
export interface FormError {
validationRule: string
errorMessageHTML: string | SafeHtml
}
export interface DynamicFormInput<T> {
type: string, // Maps to dynamic-form.inputs.const.ts
name: string,
label?: string,
defaultValue?: T,
placeholder?: string,
hint?: string,
validators?: ValidatorFn | ValidatorFn[],
errors?: FormError[]
}