Develop Together -3 (Creating Validation)

Columns is the class that we will create to check empty passages or to fill in incorrect cases.

We add a class named Validations by entering the Business Layer and right clicking the Validation folder and selecting Add->Class (ModuleName)

Then we save it as (ModuleName)Validation : AbstractValidator<(ModuleName(Entities)> and create constaction with Ctor

Thanks to the AbstractValidation plugin, we can capture these errors in a much simpler way. We can use many plugins such as NotEmpty, GreaterThanOrEqualTo, WithMessage etc..

NotEmpty= it implies that it is impassable as empty and the following WithMessage contains the contents of the warning on the screen,

GreaterThanOrEqualTo includes a warning when a value less than or equal to 0 is entered.