MCPcopy Create free account
hub / github.com/adobe/react-spectrum / validate

Function validate

packages/react-stately/src/color/useColorFieldState.ts:190–190  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

188 let decrementToMin = () => safelySetColorValue(MIN_COLOR);
189
190 let validate = (value: string) => value === '' || !!value.match(/^#?[0-9a-f]{0,6}$/i)?.[0];
191
192 return {
193 ...validation,

Callers 2

runValidateFunction · 0.50
useTimeFieldStateFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected