You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we have TCFormFields.TextInput component with type="number" and we use isRequired validate rule like validations={ isRequired: true }, then on rendering such component with value which is numerical there would be error in console:
index.js?15f1:23 Uncaught TypeError: value.trim is not a function
at Object.eval [as isRequired]
If we have
TCFormFields.TextInput
component withtype="number"
and we useisRequired
validate rule likevalidations={ isRequired: true }
, then on rendering such component with value which is numerical there would be error in console:The reason for this is code in this file https://github.com/appirio-tech/react-components/blob/feature/connectv2/components/Formsy/index.js. It applies
trim()
method to thevalue
without prior checking ifvalue
is a string.The text was updated successfully, but these errors were encountered: