DEV Community

skptricks
skptricks

Posted on

React Native Check Value Is Number Or Not Using isNaN() Validation

Source : React Native Check Value Is Number Or Not Using isNaN() Validation

This tutorial explains how to check value is a number or not a number using isNaN() function in react native application. The function isNaN() is used to check the value of any variable or state is a number or not. In this example we will check input is a number or not.

To Check Value is a Number or Not :
isNaN(Pass the Value to check); //It will return true if not a number else false

Note : If the value do not contain the number then it will return True and if the value contain number value then it will return us False.

Click here to read more

Top comments (1)

Collapse
 
dance2die profile image
Sung M. Kim

Hi @skptricks

We encourage the entire article to be published on DEV.to (if you have proper rights), with a linkback if appropriate. Otherwise, we recommend original material, such as an original commentary on the article.

From the Terms of Use:

Users must make a good-faith effort to share content that is...not designed primarily for the purposes of promotion or creating backlinks. Additionally, posts must contain substantial content β€” they may not merely reference an external link that contains the full post.

Posts that are simply intended to encourage readers to view an external resource are discouraged.

Thank you.