Skip to content

API Reference


API Reference / @dasch-ng/validators / IntegerValidatorDirective

Class: IntegerValidatorDirective ​

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

Template-driven version of integerValidator: <input ngModel validateInteger />.

Implements ​

  • Validator

Constructors ​

Constructor ​

new IntegerValidatorDirective(): IntegerValidatorDirective

Returns ​

IntegerValidatorDirective

Methods ​

validate() ​

validate(control): ValidationErrors | null

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

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.