-
Notifications
You must be signed in to change notification settings - Fork 7
Server Validation
DeclanBuckley edited this page Jan 25, 2021
·
11 revisions
Home / Developer / Server Tier / Validation
Description of Server Side Validation, using **Fluent Validation **as a validation framework with code example for creating the Validator.
PxStat uses FluentValidation as a validation framework. For details, please see https://fluentvalidation.net/. The FluentValidation Validators are part of the BaseTemplate model - a relevant validator must be injected into the Base class during construction.
The Validator is applied to a specific DTO. Therefore your DTO must be defined before creating the validator. An example of a validator is shown below:
internal class Comment_VLD : AbstractValidator<Comment_DTO>
{
internal Comment_VLD()
{
//Mandatory - CmmValue
RuleFor(f => f.CmmValue).Length(1, 1024).WithMessage("Invalid Comment").WithName("CommentValueValidation");
}
}
Update
Database Scripts
Configuration
API
- Home
- Data
- Security
- Subscription
- System
- Navigation
- Notification
- Settings
- Workflow
- Px Build
Developer
- Home
- Developer Tools
- Client Tier
- Server Tier
- Database Tier