UNPKG

ngx-forms-builder

Version:

A small library that adds validation with decorators and build angular forms.

14 lines (13 loc) 875 B
import { Validations } from './validations.enum'; import { ValidatorFn } from '@angular/forms'; declare type PropertyDecorator = (target: object, propertyKey: string | symbol) => void; export declare const createValidationDecorator: (validation: Validations) => () => PropertyDecorator; export declare const createValidationDecoratorWithValue: <T>(validation: Validations) => (value?: T) => PropertyDecorator; export declare const Required: () => PropertyDecorator; export declare const Email: () => PropertyDecorator; export declare const Exclude: () => PropertyDecorator; export declare const Min: (value?: number) => PropertyDecorator; export declare const Max: (value?: number) => PropertyDecorator; export declare const Pattern: (value?: string | RegExp) => PropertyDecorator; export declare const CustomValidator: (value?: ValidatorFn) => PropertyDecorator; export {};