import { AbstractControl, ValidationErrors, ValidatorFn, FormGroup, AsyncValidatorFn } from '@angular/forms';
import { FieldContext, UxDynFormModelArray } from './ux-dyn-core.model';
import { Observable } from 'rxjs';
export declare type UxDynValidationMetaData = string | UxDynValidationMetaDataObject;
export declare class UxDynValidationMetaDataObject {
    valFnId: string;
    params?: Array<any>;
    severity?: string;
    /**
     *It is possible to use alternative message function that you had defined in valMessageMap.
     * Function should be satisfying the error interface.
     */
    messageFnId?: string;
    constructor(values: any);
}
export interface UxDynValidators {
    validatorFn?: Array<UxDynValidationMetaData | ValidatorFn>;
}
export declare class UxDynValidationErrorsClass {
    uxValidationError: UxDynValidationError;
    constructor(uxValidationError: UxDynValidationError);
}
export interface UxDynValidationError {
    message: string;
    type: string;
    name?: string;
}
export interface UxDynValidationFieldInfo {
    fieldContext: FieldContext;
    children?: UxDynFormModelArray;
}
export declare function uxDynValidator(fn: ValidatorFn | any, message: (arg?: any) => string, severity: string, fieldInfo?: UxDynValidationFieldInfo): (c: AbstractControl) => null | ValidationErrors;
export declare function uxDynAsyncValidator(fn: AsyncValidatorFn, message: (arg?: any) => string, severity: string, fieldInfo?: UxDynValidationFieldInfo): (c: AbstractControl) => null | Observable<ValidationErrors>;
export declare function isNull(val: any): any;
/**
 * It will check that at least one of value is not empty(or null/undefined) at specified keys for target object.
 */
export declare function oneOfRequired(...params: any[]): ValidationErrors;
export declare type OneOfRequiredValidationParams = Array<{
    fieldKey: string;
    fieldLabel: string;
}>;
/**
 * It runs  If only If (its parent control is not empty object OR its parent has groupRequired/advRequired error)
 *  It will check If object&array is not empty(or null/undefined for simple types).
 */
export declare function groupRequired(control: AbstractControl): ValidationErrors;
/**
 * It is advanced version of the default required validation.
 * It will check If object&array is not empty(or null/undefined for simple types).
 */
export declare function advRequired(control: AbstractControl): ValidationErrors;
/**
 * It is a validation helper which should be defined on the parent control of the controls have groupRequired meta-data.
 It runs validations for all the controls when parent control’s value is changed.
 */
export declare function groupLevelRequired(control: FormGroup): {
    [key: string]: any;
} | null;
