src/validation/pattern.model.ts
Properties |
|
Methods |
|
constructor(message: string, value: string)
|
Defined in src/validation/pattern.model.ts:3
|
Public isRequired |
isRequired()
|
Defined in src/validation/pattern.model.ts:13
|
Returns :
boolean
|
Public value |
value:
|
Type : string
|
Defined in src/validation/pattern.model.ts:7
|
import { Validation, ValidationType } from '.';
export class Pattern extends Validation {
public constructor(
message: string,
public value: string
) {
super(ValidationType.PATTERN, message);
}
/** @override */
public isRequired(): boolean {
return ValidationType.PATTERN === this.type && 'true' === this.value.toString();
}
}