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

Method isValid

packages/main/src/DatePicker.ts:710–716  ·  view source on GitHub ↗

* Checks if a value is valid against the current date format of the DatePicker. * @public * @param value A value to be tested against the current date format * @deprecated Use isValidValue or isValidDisplayValue instead

(value: string)

Source from the content-addressed store, hash-verified

708 * @deprecated Use isValidValue or isValidDisplayValue instead
709 */
710 isValid(value: string): boolean {
711 if (value === "" || value === undefined) {
712 return true;
713 }
714
715 return !!this.getFormat().parse(value);
716 }
717
718 /**
719 * Checks if a value is valid against the current date format of the DatePicker.

Callers 1

onBeforeRenderingMethod · 0.95

Calls 2

parseMethod · 0.45
getFormatMethod · 0.45

Tested by

no test coverage detected