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

Method isValidValue

packages/main/src/TimePicker.ts:885–891  ·  view source on GitHub ↗

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

(value: string | undefined)

Source from the content-addressed store, hash-verified

883 * @since 2.21.0
884 */
885 isValidValue(value: string | undefined): boolean {
886 if (value === "") {
887 return true;
888 }
889
890 return !!this.getValueFormat().parse(value as string, true);
891 }
892
893 /**
894 * Converts a value from displayFormat to valueFormat

Callers 8

formValidityMethod · 0.95
openInputsPopoverMethod · 0.95
_updateValueStateMethod · 0.95
_togglePickerMethod · 0.45
formValidityMethod · 0.45
onSelectedDatesChangeMethod · 0.45

Calls 2

getValueFormatMethod · 0.95
parseMethod · 0.45

Tested by

no test coverage detected