UNPKG

@rxap/forms

Version:

This package provides a set of tools and directives to simplify working with Angular forms, including reactive forms, custom validators, and form directives for handling loading, submitting, and error states. It offers decorators for defining forms and co

25 lines (24 loc) 760 B
import { AbstractControl, ValidationErrors } from '@angular/forms'; /** * Options to be passed to IsNumber decorator. */ export interface IsNumberOptions { allowNaN?: boolean; allowInfinity?: boolean; maxDecimalPlaces?: number; strict?: boolean; } /** * Checks if a given value is a number. */ export declare function isNumber(value: unknown, options?: IsNumberOptions): value is number; /** * @deprecated use RxapValidators.isNumber() instead * @param control * @constructor */ export declare function IsNumber(control: AbstractControl): ValidationErrors | null; export declare function _IsNumber({ message, options, }?: { message?: string; options?: IsNumberOptions; }): (control: AbstractControl) => ValidationErrors | null;