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

Method isValid

packages/main/src/TimePicker.ts:862–867  ·  view source on GitHub ↗

* Checks if a value is valid against the current `formatPattern` value. * * **Note:** an empty string is considered as valid value. * @param value The value to be tested against the current date format * @public

(value: string | undefined)

Source from the content-addressed store, hash-verified

860 * @public
861 */
862 isValid(value: string | undefined): boolean {
863 if (value === "") {
864 return true;
865 }
866 return !!this.getFormat().parse(value as string, true);
867 }
868
869 isValidDisplayValue(value: string | undefined): boolean {
870 if (value === "") {

Callers 1

onBeforeRenderingMethod · 0.95

Calls 2

getFormatMethod · 0.95
parseMethod · 0.45

Tested by

no test coverage detected