(value: mixed)
| 166 | } |
| 167 | |
| 168 | export function checkFormFieldValueStringCoercion(value: mixed): void | string { |
| 169 | if (__DEV__) { |
| 170 | if (willCoercionThrow(value)) { |
| 171 | console.error( |
| 172 | 'Form field values (value, checked, defaultValue, or defaultChecked props)' + |
| 173 | ' must be strings, not %s.' + |
| 174 | ' This value must be coerced to a string before using it here.', |
| 175 | typeName(value), |
| 176 | ); |
| 177 | return testStringCoercion(value); // throw (to help callers find troubleshooting comments) |
| 178 | } |
| 179 | } |
| 180 | } |
no test coverage detected