libs/nx/src/executors/shared/metadata-utils/__test/my-team-plugin-lib/src/other/injectable-files/validator-validation-method-with-untyped-param.ts
Properties |
escapedMaxLength | |
Type |
number
|
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;
}
}