# CustomValidator | CICADA
Documentation for CICADA

Provides methods to perform custom validation to form inputs.

### Hierarchy

- CustomValidator

## Index

### Constructors

- constructor

### Methods

- passwordMatchValidator
- patternValidator

## Constructors

### constructor

- new CustomValidator(): CustomValidator

- #### Returns CustomValidator

## Methods

### Static passwordMatchValidator

- passwordMatchValidator(control: AbstractControl): void

- - Defined in src/app/_helpers/custom.validator.ts:13

  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

- - Defined in src/app/_helpers/custom.validator.ts:28

  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