How to set the property to allow positve integers only?
public virutal int Number {get; set;}
How can I customize to allow positve integers only?
Hi Anusha,
You can decorate your property with Range attribute like this:
[Range(1, int.MaxValue)] public virtual int Number { get; set; }
Hope this helps!
How to set the property to allow positve integers only?
public virutal int Number {get; set;}
How can I customize to allow positve integers only?