بنقرة واحدة
servicestack-validation
Applies FluentValidation and ServiceStack validation filters correctly.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Applies FluentValidation and ServiceStack validation filters correctly.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Designs stable, discoverable APIs using routes, metadata, and versioning conventions.
Implements authentication using ServiceStack Auth Providers and session handling.
Applies role-, permission-, and ownership-based authorization using ServiceStack idioms.
Implements AutoQuery services, custom filters, and permission-aware querying.
Designs request/response DTOs using DTO-first, message-based ServiceStack conventions.
Controls OpenAPI / metadata exposure without compromising ServiceStack-first design.
| name | servicestack-validation |
| description | Applies FluentValidation and ServiceStack validation filters correctly. |
ServiceStack uses FluentValidation to provide a declarative way to validate Request DTOs.
AbstractValidator<TRequestDto>.RuleFor syntax.ServiceInterface project (usually).public class GetCustomerValidator : AbstractValidator<GetCustomer>
{
public GetCustomerValidator()
{
RuleFor(r => r.Id).GreaterThan(0);
}
}
Validators are automatically registered in the IoC container if you use the ValidationFeature.
// AppHost.Configure
Plugins.Add(new ValidationFeature());
container.RegisterValidators(typeof(MyServices).Assembly);
ValidationFeature installs a global request filter that automatically executes validators before the service.ResponseStatus inside your Response DTO.While automatic validation is preferred, you can manually validate if needed:
var results = validator.Validate(request);
if (!results.IsValid)
throw results.ToException();
.WithErrorCode() for custom error codes that clients can easily switch on.