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
It would be great if numeraljs would allow to validate a given string to be a number (or not).
I was wondering if this would be possible by using a similar approach like unformat(), removing thousand separator, the abbreviations first, then taking the result of
string.replace(/[^0-9.-]+/g, '')
and determining if the length is different to the length of the source string (--> check if the string contained invalid characters).
What do you think?
The text was updated successfully, but these errors were encountered:
It would be great if numeraljs would allow to validate a given string to be a number (or not).
I was wondering if this would be possible by using a similar approach like unformat(), removing thousand separator, the abbreviations first, then taking the result of
string.replace(/[^0-9.-]+/g, '')
and determining if the length is different to the length of the source string (--> check if the string contained invalid characters).
What do you think?
The text was updated successfully, but these errors were encountered: