In this post I described the problem that by default, DataAnnotation validation doesn't recursively inspect all properties in an object for DataAnnotation attributes. There are several solutions to this problem, but in this post I used the MiniValidation library from Damian Edwards. This simple library provides a convenience wrapper around DataAnnotation validation, as well as providing features like recursive validation. Finally I showed how you can replace the built-in DataAnnotation validation with a MiniValidation-based validator
var builder = WebApplication.CreateBuilder(args); builder.Services.AddOptions<MySettings>() .BindConfiguration("MySettings") .ValidateMiniValidation() // 👈 Replace with mini validation .ValidateOnStart(); var app = builder.Build();
OptionsValidationException: DataAnnotation validation failed for 'MySettings' member: 'Nested.Value' with errors: 'The Value field is required.'.; DataAnnotation validation failed for 'MySettings' member: 'Nested.Count' with errors: 'The field Count must be between 1 and 100.'. Microsoft.Extensions.Options.OptionsFactory<TOptions>.Create(string name) Microsoft.Extensions.Options.OptionsMonitor<TOptions>+<>c__DisplayClass10_0.<Get>b__0()
دانلود منیجر پرسپولیس
Boost Downloading Using Libre Software
Persepolis Download Manager
For GNU/Linux, FreeBSD, PC-BSD, OpenBSD, Mac OS X and Windows
10 ابزار برای بهره وری بهتر در React
Unit Testing در AngularJS
JavaScript is a dynamically typed language which comes with great power of expression, but it also comes with almost no help from the compiler. For this reason we feel very strongly that any code written in JavaScript needs to come with a strong set of tests. We have built many features into Angular which make testing your Angular applications easy. With Angular, there is no excuse for not testing.
- از این پس jqGrid به «Guriddo jqGrid JavaScript» تغییر نام مییابد.
- مجوز سورس باز و رایگان قبلی آن به «Creative Commons Attribution-NonCommercial 3.0 License» تغییر خواهد یافت. یعنی همچنان سورس باز است؛ اما دیگر رایگان نیست و مجوز استفادهی تجاری از آن، باید خریداری شود.
- سایت جدید آن guriddo.net خواهد بود.