Options
All
  • Public
  • Public/Protected
  • All
Menu

Provides methods to perform custom validation to form inputs.

Hierarchy

  • CustomValidator

Index

Constructors

constructor

Methods

Static passwordMatchValidator

  • passwordMatchValidator(control: AbstractControl): void
  • Sets errors to the confirm password input field if it does not match with the value in the password input field.

    Parameters

    • control: AbstractControl

      The control object of the form being validated.

    Returns void

Static patternValidator

  • patternValidator(regex: RegExp, error: ValidationErrors): ValidationErrors
  • Sets errors to a form field if it does not match with the regular expression given.

    Parameters

    • regex: RegExp

      The regular expression to match with the form field.

    • error: ValidationErrors

      Defines the map of errors to return from failed validation checks.

    Returns ValidationErrors

    The map of errors returned from failed validation checks.

Generated using TypeDoc