Skip to content

Instantly share code, notes, and snippets.

@gistlyn
Last active February 7, 2024 06:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gistlyn/fe6a9ba01b16c1fba2008e3739cfac5b to your computer and use it in GitHub Desktop.
Save gistlyn/fe6a9ba01b16c1fba2008e3739cfac5b to your computer and use it in GitHub Desktop.
Configure Validation Support
using ServiceStack;
using ServiceStack.Validation;
[assembly: HostingStartup(typeof(MyApp.ConfigureValidation))]
namespace MyApp;
public class ConfigureValidation : IHostingStartup
{
public void Configure(IWebHostBuilder builder) => builder
.ConfigureServices(services => {
// ValidationFeature is pre-registered by default from v5.13
// services.AddPlugin(new ValidationFeature());
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment