Editing
DikeErrorMessage
abstract class DikeErrorMessage {
constructor();
get messages(): string[];
assign(messages: DikeErrorMessage): this;
addMessage(errorKey: string, errorMessage: string): this;
removeMessage(errorKey: string): string | undefined;
getMessage(errorKey: string): string | undefined;
}
DikeStandardErrorMessage
class DikeStandardErrorMessage extends DikeErrorMessage {
constructor() {
super();
this.addMessage(ErrorType.MIN, 'The minimum number is incorrect');
this.addMessage(ErrorType.MAX, 'The maximum number is incorrect');
this.addMessage(ErrorType.REQUIRED, 'Required field');
this.addMessage(ErrorType.EMAIL, 'The email pattern is incorrect');
this.addMessage(ErrorType.MIN_LENGTH, 'The minimum length is incorrect');
this.addMessage(ErrorType.MAX_LENGTH, 'The maximum length is incorrect');
this.addMessage(ErrorType.PATTERN, 'Wrong pattern');
}
}
CustomErrorMessage
class CustomErrorMessage extends DikeErrorMessage {
constructor();
}
Last updated