armisa-models
Version:
models of armisa!
32 lines (31 loc) • 1.24 kB
TypeScript
import { EnumValidateState } from '../enums';
import { BasePageData } from './BasePageData';
import { IControlSimulateKey } from './Events';
import { BaseSelfControl } from '../SelfModels/BaseSelfControl';
import { IControlsElementType } from './TabbingControl';
export interface IValidateFields {
validate?: boolean;
required?: boolean;
onlyLastLevel?: boolean;
minValue?: number | null;
maxValue?: number | null;
minLength?: number | null;
maxLength?: number | null;
onErrorSimulateKey?: IControlSimulateKey;
}
declare class ValidatieValuesClass {
propertyName: string;
controls: IControlsElementType;
constructor(propertyName: string, controls: IControlsElementType);
}
export type IResultOfValidate = true | [string, EnumValidateState];
export declare class ValidatingControl {
pageData: BasePageData;
controls: ValidatieValuesClass[];
constructor(pageData: BasePageData);
addControl(property: BaseSelfControl<any, any, any, IControlsElementType>): void;
removeControl: (property: BaseSelfControl<any, any, any, IControlsElementType>) => void;
removeAllControls: () => void;
validateForm: (mainState: any) => number;
}
export {};