File

libs/nx/src/executors/shared/metadata-utils/__test/my-team-plugin-lib/src/other/injectable-files/validator-validation-method-with-untyped-param.ts

Index

Properties
Methods

Constructor

constructor(options: EscapedMaxLengthValidatorPluginOptions)
Parameters :
Name Type Optional
options EscapedMaxLengthValidatorPluginOptions No

Methods

validate
validate(escapedMaxLength)
Parameters :
Name Optional Default value
escapedMaxLength No this.options.escapedMaxLength
Returns : ValidatorFn

Properties

type
Type : PluginValidatorType
Default value : 'PLUGIN_MYTEAM_ESCAPED_MAX_LENGTH'
import { PluginValidator, PluginValidatorType } from '@allianz/taly-core';
import { Injectable, InjectionToken } from '@angular/core';
import { ValidatorFn } from '@angular/forms';

export interface EscapedMaxLengthValidatorPluginOptions {
  escapedMaxLength: number;
}

export const ESCAPED_MAX_LENGTH_PLUGIN_OPTIONS =
  new InjectionToken<EscapedMaxLengthValidatorPluginOptions>('ESCAPED_MAX_LENGTH_PLUGIN_OPTIONS');

@Injectable({ providedIn: 'root' })
export class EscapedMaxLengthValidator implements PluginValidator {
  constructor(private options: EscapedMaxLengthValidatorPluginOptions) {}

  type: PluginValidatorType = 'PLUGIN_MYTEAM_ESCAPED_MAX_LENGTH';

  validate(escapedMaxLength = this.options.escapedMaxLength): ValidatorFn {
    return null;
  }
}

results matching ""

    No results matching ""