import { Base, EmitType } from '@syncfusion/ej2-base';
import { INotifyPropertyChanged } from '@syncfusion/ej2-base';
import { FormValidatorModel } from './form-validator-model';
/**
* global declarations
*/
export declare const regex: {
[key: string]: RegExp;
};
/**
* ErrorOption values
*
* @private
*/
export declare enum ErrorOption {
/**
* Defines the error message.
*/
Message = 0,
/**
* Defines the error element type.
*/
Label = 1
}
/**
* FormValidator class enables you to validate the form fields based on your defined rules
* ```html
*
*
* ```
*/
export declare class FormValidator extends Base implements INotifyPropertyChanged {
private validated;
private errorRules;
private allowSubmit;
private required;
private infoElement;
private inputElement;
private selectQuery;
private inputElements;
private l10n;
private internationalization;
private localyMessage;
/**
* default locale variable
*/
locale: string;
/**
* Ignores input fields based on the class name
*
* @default 'e-hidden'
*/
ignore: string;
/**
* Maps the input fields with validation rules
*
* @default {}
*/
rules: {
[name: string]: {
[rule: string]: Object;
};
};
/**
* Sets the defined css class to error fields
*
* @default 'e-error'
*/
errorClass: string;
/**
* Sets the defined css class to valid fields
*
* @default 'e-valid'
*/
validClass: string;
/**
* Specify HTML element for error
*
* @default 'label'
*/
errorElement: string;
/**
* Specify HTML element for error container
*
* @default 'div'
*/
errorContainer: string;
/**
* Option to display the error
*
* @default ErrorOption.Label
*/
errorOption: ErrorOption;
/**
* Triggers when a field's focused out
*
* @event focusout
*/
focusout: EmitType;
/**
* Trigger when keyup is triggered in any fields
*
* @event keyup
*/
keyup: EmitType;
/**
* Triggers when a check box field is clicked
*
* @event click
*/
click: EmitType;
/**
* Trigger when a select/drop-down field is changed
*
* @event change
*/
change: EmitType;
/**
* Triggers before form is being submitted
*
* @event submit
*/
submit: EmitType;
/**
* Triggers before validation starts
*
* @event validationBegin
*/
validationBegin: EmitType