MCPcopy Create free account
hub / github.com/UI5/webcomponents / formValidityMessage

Method formValidityMessage

packages/main/src/DatePicker.ts:413–432  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

411 static i18nBundle: I18nBundle;
412
413 get formValidityMessage() {
414 const validity = this.formValidity;
415
416 if (validity.valueMissing) {
417 // @ts-ignore oFormatOptions is a private API of DateFormat
418 return DatePicker.i18nBundle.getText(DATEPICKER_VALUE_MISSING, this.getFormat().oFormatOptions.pattern as string);
419 }
420 if (validity.patternMismatch) {
421 // @ts-ignore oFormatOptions is a private API of DateFormat
422 return DatePicker.i18nBundle.getText(DATEPICKER_PATTERN_MISSMATCH, this.getFormat().oFormatOptions.pattern as string);
423 }
424 if (validity.rangeUnderflow) {
425 return DatePicker.i18nBundle.getText(DATEPICKER_RANGE_UNDERFLOW, this.minDate);
426 }
427 if (validity.rangeOverflow) {
428 return DatePicker.i18nBundle.getText(DATEPICKER_RANGE_OVERFLOW, this.maxDate);
429 }
430
431 return "";
432 }
433
434 get formValidity(): ValidityStateFlags {
435 return {

Callers

nothing calls this directly

Calls 2

getTextMethod · 0.80
getFormatMethod · 0.45

Tested by

no test coverage detected