MCPcopy Index your code
hub / github.com/Lobos/react-ui / handleError

Function handleError

src/utils/validation.js:9–18  ·  view source on GitHub ↗
(label, value, key, tip)

Source from the content-addressed store, hash-verified

7setLang('validation');
8
9function handleError(label, value, key, tip) {
10 // handle error
11 let text = getLang('validation.tips.' + key, null);
12 if (text) {
13 text = (label || '') + format(text, value);
14 } else {
15 text = tip;
16 }
17 return new Error(text);
18}
19
20export function validate(value, valueType, {
21 label,

Callers 1

validateFunction · 0.85

Calls 2

getLangFunction · 0.90
formatFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…