From cf8b58aa86b4e77077c737061531f25e8ed115bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 28 Apr 2020 03:03:34 +0300 Subject: [PATCH] Update document for ValidationAttributes --- docs/en/Object-Extensions.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/Object-Extensions.md b/docs/en/Object-Extensions.md index 6eff328c85..bee229dc27 100644 --- a/docs/en/Object-Extensions.md +++ b/docs/en/Object-Extensions.md @@ -197,8 +197,8 @@ ObjectExtensionManager.Instance "SocialSecurityNumber", options => { - options.ValidationAttributes.Add(new RequiredAttribute()); - options.ValidationAttributes.Add( + options.Attributes.Add(new RequiredAttribute()); + options.Attributes.Add( new StringLengthAttribute(32) { MinimumLength = 6 } @@ -248,12 +248,12 @@ ObjectExtensionManager.Instance objConfig.AddOrUpdateProperty("Password", propertyConfig => { - propertyConfig.ValidationAttributes.Add(new RequiredAttribute()); + propertyConfig.Attributes.Add(new RequiredAttribute()); }); objConfig.AddOrUpdateProperty("PasswordRepeat", propertyConfig => { - propertyConfig.ValidationAttributes.Add(new RequiredAttribute()); + propertyConfig.Attributes.Add(new RequiredAttribute()); }); //Write a common validation logic works on multiple properties