Flexbase
Search…
INSERT : Attribute Validation
BasicCRUD Insert Query with Bridge
The first one is attribute-based validation. So in the InputAPIModel, you can define attributes to validate your input here.
1
public class AddCustomerInputAPIModel : IFlexInputAPIModel
2
{
3
[StringLength(50)]
4
public string Name { get; set; }
5
public DateTime DateOfBirth { get; set; }
6
}
Copied!
In this case it is string length 50 or it can be a validation of four number format or an email format or any other basic validation that is available with asp.net code. You can even create your own validation attributes which are the generic validation.
Last modified 1yr ago
Copy link