File

projects/common/lib/models/error-message.interface.ts

Index

Properties

Indexable

[key: string]: string

Properties

required
required: string
Type : string
Optional
export const LabelReplacementTag = '{label}';
export interface ErrorMessage {
  required?: string;
  [key: string]: string;
}

// To catch all occurances of the label tag in the message
const regExpLabel = new RegExp( LabelReplacementTag, 'g' );

// Function only used with library
export function replaceLabelTag( str: string, value: string ) {
  return str.replace( regExpLabel, value );
}

result-matching ""

    No results matching ""