Skip to content

API Reference


API Reference / @dasch-ng/validators / FloatValidatorDirective

Class: FloatValidatorDirective ​

Defined in: number/integer-float.validator.ts:32

Template-driven version of floatValidator: <input ngModel validateFloat />.

Implements ​

  • Validator

Constructors ​

Constructor ​

new FloatValidatorDirective(): FloatValidatorDirective

Returns ​

FloatValidatorDirective

Methods ​

validate() ​

validate(control): ValidationErrors | null

Defined in: number/integer-float.validator.ts:33

Parameters ​

control ​

AbstractControl

The control to validate against.

Returns ​

ValidationErrors | null

A map of validation errors if validation fails, otherwise null.

Description ​

Method that performs synchronous validation against the provided control.

Implementation of ​

Validator.validate

Released under the MIT License.