(label, value, key, tip)
| 7 | setLang('validation'); |
| 8 | |
| 9 | function 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 | |
| 20 | export function validate(value, valueType, { |
| 21 | label, |