Use or Create Attributes for data validation in properties?

1

Hi guys I would like to know if there are attributes or can be created for properties that allow to add restrictions like:

-Only positive numbers

-Length of a minimum string 3 and maximum 255

-It can not be null

-Only 1 or 0 representing a binary (true, false)

Etc ...

to help the validation of data, since I work a project with a database and I have created structs that represent the tables as Client, Person, Product

    
asked by Deiby Olaya Orejuela 10.06.2018 в 23:27
source

0 answers