parent
4d62be69c5
commit
2707012181
|
@ -40,7 +40,7 @@ export {NgSelectOption, SelectControlValueAccessor} from './directives/select_co
|
|||
export {SelectMultipleControlValueAccessor} from './directives/select_multiple_control_value_accessor';
|
||||
export {AsyncValidator, AsyncValidatorFn, CheckboxRequiredValidator, EmailValidator, MaxLengthValidator, MinLengthValidator, PatternValidator, RequiredValidator, ValidationErrors, Validator, ValidatorFn} from './directives/validators';
|
||||
export {FormBuilder} from './form_builder';
|
||||
export {AbstractControl, FormArray, FormControl, FormGroup} from './model';
|
||||
export {AbstractControl, AbstractControlOptions, FormArray, FormControl, FormGroup} from './model';
|
||||
export {NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators} from './validators';
|
||||
export {VERSION} from './version';
|
||||
|
||||
|
|
|
@ -80,10 +80,24 @@ function coerceToAsyncValidator(
|
|||
|
||||
export type FormHooks = 'change' | 'blur' | 'submit';
|
||||
|
||||
/**
|
||||
* @whatItDoes Interface for options provided to an {@link AbstractControl}.
|
||||
*
|
||||
* @experimental
|
||||
*/
|
||||
export interface AbstractControlOptions {
|
||||
/**
|
||||
* List of validators applied to control.
|
||||
*/
|
||||
validators?: ValidatorFn|ValidatorFn[]|null;
|
||||
/**
|
||||
* List of async validators applied to control.
|
||||
*/
|
||||
asyncValidators?: AsyncValidatorFn|AsyncValidatorFn[]|null;
|
||||
updateOn?: FormHooks;
|
||||
/**
|
||||
* The event name for control to update upon.
|
||||
*/
|
||||
updateOn?: 'change'|'blur'|'submit';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -86,6 +86,13 @@ export declare abstract class AbstractControlDirective {
|
|||
reset(value?: any): void;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export interface AbstractControlOptions {
|
||||
asyncValidators?: AsyncValidatorFn | AsyncValidatorFn[] | null;
|
||||
updateOn?: 'change' | 'blur' | 'submit';
|
||||
validators?: ValidatorFn | ValidatorFn[] | null;
|
||||
}
|
||||
|
||||
/** @stable */
|
||||
export declare class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy {
|
||||
readonly asyncValidator: AsyncValidatorFn | null;
|
||||
|
|
Loading…
Reference in New Issue