Typely
GitHub
  • Overview
    • πŸ‘Welcome!
  • Validations
    • πŸ“Common
    • πŸ”’Number
    • βš–οΈComparable
    • ✏️String
  • Customize errors
    • 🌎Localization
    • πŸ”Sensitive data
  • General
    • 🧩Class VS Struct
    • πŸ–ΌοΈSupported frameworks
    • πŸš€Benchmarks
    • ⚠️Limitations
  • Design decisions
    • πŸ”„Conversions
    • ℹ️Use of interfaces
    • πŸ€Έβ€β™‚οΈUnderlying type comparison
    • πŸ’‚Validations
Powered by GitBook
On this page
Edit on GitHub
  1. Customize errors

Sensitive data

When a validation error is created, you can choose to output the attempted value that failed. The value will be accessible in the ValidationError.PlaceholderValues dictionary with the key Value when thrown.

Here is an example of how to activate the setting in your API:

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
    TypelyOptions.EnableSensitiveDataLogging(env.IsDevelopment()); 
}
PreviousLocalizationNextClass VS Struct

Last updated 2 years ago

πŸ”