Check out example codes for "integer required asp.net core". It will help you in understanding the concepts better.

Code Example 1

[Range(1, int.MaxValue, ErrorMessage = "Value for {0} must be between {1} and {2}.")]

Learn ReactJs, React Native from akashmittal.com