Use a nullable int type and check for null.
public class MyClass
{
public int? MyNullableInt { get; set; }
}
The official documentation covers model validation.
https://learn.microsoft.com/en-us/aspnet/core/mvc/models/validation?view=aspnetcore-8.0