ng-bootstrap-form-generator
Version:
Angular 2 + Bootstrap 4 Form Generator. Library provides Angular components that help quickly generate Bootstrap Form from JavaScript object. Component supports validators, help messages, and error messages.
33 lines (32 loc) • 1.03 kB
TypeScript
import { ValidatorFn, AsyncValidatorFn } from '@angular/forms';
import { ValidationMessageFn } from './ValidationMessage';
export declare type InputType = 'text' | 'search' | 'email' | 'url' | 'tel' | 'password' | 'number' | 'date' | 'color' | 'checkbox' | 'hidden' | 'select';
export declare class BsfControlOptions {
elId?: string;
field: string;
title?: string;
defaultValue?: any;
type?: InputType;
format?: string;
placeholder?: string;
helpText?: string;
helpTextHtml?: string;
disabled?: boolean;
required?: boolean;
maxlength?: number;
minlength?: number;
requiredTrue?: boolean;
select?: BsfSelectOptions;
validator?: ValidatorFn | ValidatorFn[];
asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[];
validationMessage?: {
[key: string]: (string | ValidationMessageFn);
};
}
export declare class BsfSelectOptions {
options?: [{
text: string;
value: any;
}];
emptyText?: string;
}