4,815 questions
The Range attribute validates the magnitude of a numeric type.
public class Test
{
[Range(1000000000, int.MaxValue)]
public int abc { get; set; }
}
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi All,
In my model i have integer property. I want to check length of that property.
public class test{
public int abc { get; set; }
}
test t=new test()
t.abc=123456789 // Here i want to make sure that length of value is 10 and its integer value
I am using this model for API. In API can accept list of data from user in a single call.
Public class ListofTest{
public<List> test t
}
My question is possible to check length of int data type using annotation?
I am using .net core 6 for developing API