Skip to content

Commit 734664e

Browse files
authored
Update SettingsOptions.cs (#44202)
Changed the Regular Expression to allow an exclamation mark which is used in the sample code. The existing Regular Expression allowed a dash which was not used in the sample. I replaced the dash with the exclamation mark. The sample code will now run as is, instead of throwing an exception. I have tested the updated Regular Expression, and it is working as expected.
1 parent 5eed113 commit 734664e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/core/extensions/snippets/configuration/console-validation-gen/SettingsOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public sealed class SettingsOptions
77
public const string ConfigurationSectionName = "MyCustomSettingsSection";
88

99
[Required]
10-
[RegularExpression(@"^[a-zA-Z''-'\s]{1,40}$")]
10+
[RegularExpression(@"^[a-zA-Z''!'\s]{1,40}$")]
1111
public required string SiteTitle { get; set; }
1212

1313
[Required]

0 commit comments

Comments
 (0)